Bug 145695

Summary: REGRESSION (r185213): TypeError: undefined is not an object (evaluating 'WebInspector.clearLogOnReload.value')
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, tobi+webkit, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 145090    
Bug Blocks:    
Attachments:
Description Flags
[PATCH] Proposed Fix none

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.