Bug 145695 - REGRESSION (r185213): TypeError: undefined is not an object (evaluating 'WebInspector.clearLogOnReload.value')
Summary: REGRESSION (r185213): TypeError: undefined is not an object (evaluating 'WebI...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on: 145090
Blocks:
  Show dependency treegraph
 
Reported: 2015-06-05 09:27 PDT by Mark Lam
Modified: 2015-06-05 15:59 PDT (History)
9 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (4.79 KB, patch)
2015-06-05 14:44 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2015-06-05 09:27:14 PDT
This error started showing up after r185213: <http://trac.webkit.org/changeset/185213>.  The complete error message says:

Uncaught exception in inspector page: TypeError: undefined is not an object (evaluating 'WebInspector.clearLogOnReload.value') [file:///.../OpenSource/WebKitBuild/Debug/WebInspectorUI.framework/Resources/Controllers/LogManager.js:77]

I see that WebInspector.clearLogOnReload is initialized by WebInspector.loaded() in Main.js.  Are we guaranteed that WebInspector.loaded will be called before the first use of WebInspector.clearLogOnReload?  I'm seeing the above error while trying to run new inspector tests I'm writing to test exception breakpoints.
Comment 1 Radar WebKit Bug Importer 2015-06-05 09:27:34 PDT
<rdar://problem/21260137>
Comment 2 Mark Lam 2015-06-05 12:04:29 PDT
To reproduce this issue:

1. Comment out the asserts in InspectorTimelineAgent.cpp if the fix for https://bugs.webkit.org/show_bug.cgi?id=145090 is not yet landed.

2. Run the following inspector tests (landed in r185259):

OpenSource$ ./Tools/Scripts/run-webkit-tests -1 --debug inspector/debugger/break-on-*

That should run a set of 20 tests.  The issue will manifest intermittently on a subset of those tests, and result in failures due to text diffs.
Comment 3 Joseph Pecoraro 2015-06-05 13:42:52 PDT
(In reply to comment #0)
> This error started showing up after r185213:
> <http://trac.webkit.org/changeset/185213>.  The complete error message says:
> 
> Uncaught exception in inspector page: TypeError: undefined is not an object
> (evaluating 'WebInspector.clearLogOnReload.value')
> [file:///.../OpenSource/WebKitBuild/Debug/WebInspectorUI.framework/Resources/
> Controllers/LogManager.js:77]

It sounds like you reproduced this running tests. I suspect this is a Tests only issue. We just need to add a fake WebInspector.clearLogOnReload WebInspector.Setting to Test.js. Or, move it to LogManager like I suggested.

I'll take a quick look.
Comment 4 Joseph Pecoraro 2015-06-05 14:44:56 PDT
Created attachment 254389 [details]
[PATCH] Proposed Fix
Comment 5 Mark Lam 2015-06-05 14:48:52 PDT
Comment on attachment 254389 [details]
[PATCH] Proposed Fix

r=me
Comment 6 WebKit Commit Bot 2015-06-05 15:59:44 PDT
Comment on attachment 254389 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 254389

Committed r185271: <http://trac.webkit.org/changeset/185271>
Comment 7 WebKit Commit Bot 2015-06-05 15:59:49 PDT
All reviewed patches have been landed.  Closing bug.