Bug 117893 - Web Inspector: Uncaught exception when pretty printing WebInspector.Script
Summary: Web Inspector: Uncaught exception when pretty printing WebInspector.Script
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-06-21 14:13 PDT by Joseph Pecoraro
Modified: 2013-06-21 15:13 PDT (History)
5 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (1.77 KB, patch)
2013-06-21 14:17 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 Joseph Pecoraro 2013-06-21 14:13:38 PDT
* DESCRIPTION
I hit this debugging a page. I introduced a JS issue recently when I refactored some code to use WebInspector.script.resource. I removed a line declaring a local variable and didn't fix the other lines using the local.

* STEPS TO REPRODUCE
1. Evaluation the following in the console:
// testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing 
(function() { return 1+1; })(); //@ sourceURL=test
2. View the Extra Script in the inspector
  => it pretty prints and produces an uncaught exception

Patch to follow.
Comment 1 Radar WebKit Bug Importer 2013-06-21 14:13:47 PDT
<rdar://problem/14233755>
Comment 2 Joseph Pecoraro 2013-06-21 14:15:57 PDT
Oh, the error is:
[Error] ReferenceError: Can't find variable: script (Main.js, line 3527)
Comment 3 Joseph Pecoraro 2013-06-21 14:17:13 PDT
Created attachment 205216 [details]
[PATCH] Proposed Fix

Simple fix.
Comment 4 WebKit Commit Bot 2013-06-21 15:13:30 PDT
Comment on attachment 205216 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 205216

Committed r151861: <http://trac.webkit.org/changeset/151861>
Comment 5 WebKit Commit Bot 2013-06-21 15:13:32 PDT
All reviewed patches have been landed.  Closing bug.