Bug 69635 - Web Inspector: allow to start WorkerContext paused
Summary: Web Inspector: allow to start WorkerContext paused
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: Yury Semikhatsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-07 09:13 PDT by Yury Semikhatsky
Modified: 2011-10-10 02:32 PDT (History)
18 users (show)

See Also:


Attachments
Patch (41.84 KB, patch)
2011-10-07 09:26 PDT, Yury Semikhatsky
pfeldman: review+
webkit-ews: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (41.71 KB, patch)
2011-10-10 02:16 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff
Patch for landing (41.61 KB, patch)
2011-10-10 02:25 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yury Semikhatsky 2011-10-07 09:13:56 PDT
In order to be able to debug worker context initialization inspector needs to connect to front-end and restore its state before first statement of the worker script is executed. That is why we need an API for pausing worker context execution right after the context was created.
Comment 1 Yury Semikhatsky 2011-10-07 09:26:26 PDT
Created attachment 110157 [details]
Patch
Comment 2 WebKit Review Bot 2011-10-07 09:30:08 PDT
Please wait for approval from fishd@chromium.org before submitting because this patch contains changes to the Chromium public API.
Comment 3 Pavel Feldman 2011-10-07 09:42:12 PDT
Comment on attachment 110157 [details]
Patch

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

> Source/WebCore/workers/WorkerThread.cpp:68
> +    static PassOwnPtr<WorkerThreadStartupData> create(const KURL& scriptURL, const String& userAgent, const String& sourceCode, bool startPaused)

Please make sure worker folks are fine with this additional param prior to landing. Otherwise looks good.
Comment 4 Early Warning System Bot 2011-10-07 09:53:11 PDT
Comment on attachment 110157 [details]
Patch

Attachment 110157 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/10009268
Comment 5 Dmitry Lomov 2011-10-07 10:36:41 PDT
Looks good.
Comment 6 Dmitry Titov 2011-10-07 10:47:58 PDT
Comment on attachment 110157 [details]
Patch

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

Couple of nits, not on substance:

> Source/WebCore/workers/WorkerMessagingProxy.cpp:271
> +    RefPtr<DedicatedWorkerThread> thread = DedicatedWorkerThread::create(scriptURL, userAgent, sourceCode, *this, *this, false);

If we need to call this method with explicit bool param, WebKit style usually requires an enum instead of the bool. It makes call site more readable.

> Source/WebCore/workers/WorkerThread.cpp:94
> +#if ENABLE(NOTIFICATIONS)

Could you please do it in a separate patch? It's a good catch, but unrelated.
Comment 7 Gustavo Noronha (kov) 2011-10-07 11:19:12 PDT
Comment on attachment 110157 [details]
Patch

Attachment 110157 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/10005296
Comment 8 Yury Semikhatsky 2011-10-10 02:16:09 PDT
Created attachment 110340 [details]
Patch for landing
Comment 9 Yury Semikhatsky 2011-10-10 02:16:48 PDT
(In reply to comment #6)
> (From update of attachment 110157 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=110157&action=review
> 
> Couple of nits, not on substance:
> 
> > Source/WebCore/workers/WorkerMessagingProxy.cpp:271
> > +    RefPtr<DedicatedWorkerThread> thread = DedicatedWorkerThread::create(scriptURL, userAgent, sourceCode, *this, *this, false);
> 
> If we need to call this method with explicit bool param, WebKit style usually requires an enum instead of the bool. It makes call site more readable.
> 
Good point. Done.

> > Source/WebCore/workers/WorkerThread.cpp:94
> > +#if ENABLE(NOTIFICATIONS)
> 
> Could you please do it in a separate patch? It's a good catch, but unrelated.
Done. See https://bugs.webkit.org/show_bug.cgi?id=69741
Comment 10 WebKit Review Bot 2011-10-10 02:19:58 PDT
Attachment 110340 [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/workers/DedicatedWorkerThread.h:43:  The parameter name "startMode" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/workers/DedicatedWorkerThread.h:52:  The parameter name "startMode" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/workers/WorkerThread.cpp:78:  The parameter name "startMode" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/workers/SharedWorkerThread.h:41:  The parameter name "startMode" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/workers/SharedWorkerThread.h:48:  The parameter name "startMode" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/workers/WorkerThread.h:70:  The parameter name "startMode" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 6 in 27 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 11 Yury Semikhatsky 2011-10-10 02:25:34 PDT
Created attachment 110341 [details]
Patch for landing

Fixed style failures
Comment 12 Yury Semikhatsky 2011-10-10 02:32:51 PDT
Committed r97049: <http://trac.webkit.org/changeset/97049>