Bug 64379 - Web Inspector: do not pause on caught exceptions while typing in the console.
Summary: Web Inspector: do not pause on caught exceptions while typing in the console.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords:
: 64684 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-07-12 12:04 PDT by Pavel Feldman
Modified: 2011-07-18 02:42 PDT (History)
11 users (show)

See Also:


Attachments
Patch (10.96 KB, patch)
2011-07-12 12:36 PDT, Pavel Feldman
no flags Details | Formatted Diff | Diff
Patch (11.68 KB, patch)
2011-07-18 01:46 PDT, Pavel Feldman
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***