Bug 64379

Summary: Web Inspector: do not pause on caught exceptions while typing in the console.
Product: WebKit Reporter: Pavel Feldman <pfeldman>
Component: Web Inspector (Deprecated)Assignee: Pavel Feldman <pfeldman>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch yurys: review+

Description Pavel Feldman 2011-07-12 12:04:38 PDT
If user has pauseOnExceptions set to "uncaught", typing in the console may stop in the injected script. Should not.
Comment 1 Pavel Feldman 2011-07-12 12:36:47 PDT
Created attachment 100539 [details]
Patch
Comment 2 WebKit Review Bot 2011-07-12 12:39:58 PDT
Attachment 100539 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebCore/inspector/InspectorRuntimeAgent.h:56:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Source/WebCore/inspector/InspectorRuntimeAgent.cpp:60:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Total errors found: 2 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Yury Semikhatsky 2011-07-13 05:50:35 PDT
Comment on attachment 100539 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=100539&action=review

r- as WorkerInspectoController also needs change.

> Source/WebCore/inspector/InspectorController.cpp:132
> +    m_runtimeAgent->setScriptDebugServer(&m_debuggerAgent->scriptDebugServer());

Let's pass reference to ScriptDebugServer into the InspectorRuntimeAgent constructor. This way compiler will check all call sites and ensure that ScriptDebugServer is never null.
Comment 4 Yury Semikhatsky 2011-07-13 05:52:12 PDT
Comment on attachment 100539 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=100539&action=review

> Source/WebCore/inspector/InspectorRuntimeAgent.cpp:42
> +#if ENABLE(JAVASCRIPT_DEBUGGER)

No need to embrace #include wtih #if ENABLE guard.
Comment 5 Pavel Feldman 2011-07-14 09:26:40 PDT
(In reply to comment #3)
> (From update of attachment 100539 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=100539&action=review
> 
> r- as WorkerInspectoController also needs change.
> 
> > Source/WebCore/inspector/InspectorController.cpp:132
> > +    m_runtimeAgent->setScriptDebugServer(&m_debuggerAgent->scriptDebugServer());
> 
> Let's pass reference to ScriptDebugServer into the InspectorRuntimeAgent constructor. This way compiler will check all call sites and ensure that ScriptDebugServer is never null.

There are two ancestors of runtime agent (Page and Worker). Doing what you suggest will add ifdefs into three corresponding classes. It will also make their constructors receive different parameters depending on the DEBUGGER definition. It all kills readability.
Comment 6 Pavel Feldman 2011-07-18 01:46:09 PDT
Created attachment 101138 [details]
Patch
Comment 7 WebKit Review Bot 2011-07-18 01:48:37 PDT
Attachment 101138 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebCore/inspector/InspectorRuntimeAgent.h:56:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Source/WebCore/inspector/InspectorRuntimeAgent.cpp:60:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Total errors found: 2 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Pavel Feldman 2011-07-18 02:09:51 PDT
Committed r91176: <http://trac.webkit.org/changeset/91176>
Comment 9 Pavel Feldman 2011-07-18 02:42:51 PDT
*** Bug 64684 has been marked as a duplicate of this bug. ***