issue102: timing issue in tab-bar.js and new-tabs.js

Priority: bug Status: resolved
Messages
msg206 (view) Author: retroj Date: 2008-12-26.18:23:25
When multiple urls are passed to conkeror on the command line, a timing bug that exists in both tab-bar
and new-tabs results in an error like the following:

  Console error: [JavaScript Warning: "reference to undefined property b.tab" {file:
"chrome://conkeror/content/tab-bar.js" line: 106}]
  Category: chrome javascript

This problem only seems to exist on initial launch.

To reproduce:

  conkeror -q -e 'url_remoting_fn = load_url_in_new_buffer;' -e 'require("tab-bar.js");' about:blank
about:blank

or:

  conkeror -q -e 'url_remoting_fn = load_url_in_new_buffer;' -e 'require("new-tabs.js");' about:blank
about:blank
msg408 (view) Author: retroj Date: 2009-08-30.01:35:22
The source of this bug is that under certain conditions, it is possible
for a document title to be changed before the buffer constructor has run
to completion.  This causes tab_bar_update_buffer_title to get run before
tab_bar_add_buffer has been run, so buffer.tab does not yet exist.

The solution to this problem is to ensure that tab_bar_add_buffer runs as
early as possible during buffer construction instead of at the very end.
To implement this solution, a new hook, `create_buffer_early_hook' will be
added to the buffer subsystem, which runs early enough to avoid the timing
problems associated with title-setting, but late enough that basic
properties of the buffer will be available to hook functions.
History
Date User Action Args
2009-08-31 15:32:44retrojsetstatus: in-progress -> resolved
2009-08-30 01:35:23retrojsetstatus: unread -> in-progress
messages: + msg408
2008-12-26 18:23:25retrojcreate