Bug 103210

Summary: [V8] Remove WorkerContextExecutionProxy
Product: WebKit Reporter: Kentaro Hara <haraken>
Component: WebCore JavaScriptAssignee: Kentaro Hara <haraken>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, japhet, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
patch for landing none

Description Kentaro Hara 2012-11-25 16:42:12 PST
We can move methods of WorkerContextExecutionProxy to WorkerScriptController.
Comment 1 Kentaro Hara 2012-11-25 17:05:53 PST
Created attachment 175900 [details]
Patch
Comment 2 Adam Barth 2012-11-25 17:28:07 PST
Comment on attachment 175900 [details]
Patch

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

> Source/WebCore/bindings/v8/V8WorkerContextEventListener.cpp:64
> +    WorkerScriptController* script = static_cast<WorkerContext*>(context)->script();

We lost the ASSERT here.  We should add it back.

> Source/WebCore/bindings/v8/WorkerScriptController.cpp:62
> +    , m_disableEvalPending(String())

No need for this line.  The compiler will init this variable for you.

> Source/WebCore/bindings/v8/WorkerScriptController.cpp:97
> +    // Bail out if the context has already been initialized.

I'd remove this comment.

> Source/WebCore/bindings/v8/WorkerScriptController.cpp:101
> +    // Create a new environment

This one too

> Source/WebCore/bindings/v8/WorkerScriptController.cpp:129
> +    // Bail out if allocation failed.

ditto

> Source/WebCore/bindings/v8/WorkerScriptController.cpp:135
> +    // Wrap the object.

ditto

> Source/WebCore/bindings/v8/WorkerScriptController.cpp:149
> +    v8::HandleScope hs;

hs -> handleScope

> Source/WebCore/bindings/v8/WorkerScriptController.cpp:160
> +    v8::Context::Scope scope(m_context.get());

I'm surprised we don't need to create a new local handle here, but that's something to worry about in the future.

> Source/WebCore/bindings/v8/WorkerScriptController.cpp:162
> +    v8::TryCatch exceptionCatcher;

exceptionCatcher -> block

> Source/WebCore/bindings/v8/WorkerScriptController.h:101
>      private:

Please add a blank line above this line.
Comment 3 Kentaro Hara 2012-11-25 17:32:23 PST
Created attachment 175903 [details]
patch for landing
Comment 4 Kentaro Hara 2012-11-25 17:32:42 PST
All comments addressed. Thanks for reviewing.
Comment 5 WebKit Review Bot 2012-11-26 03:21:36 PST
Comment on attachment 175903 [details]
patch for landing

Clearing flags on attachment: 175903

Committed r135703: <http://trac.webkit.org/changeset/135703>
Comment 6 WebKit Review Bot 2012-11-26 03:21:39 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Kentaro Hara 2012-11-26 17:04:00 PST
*** Bug 97071 has been marked as a duplicate of this bug. ***