Bug 94713 - [V8] Remove V8Proxy from V8DOMWrapper::instantiateV8Object()
Summary: [V8] Remove V8Proxy from V8DOMWrapper::instantiateV8Object()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kentaro Hara
URL:
Keywords:
Depends on:
Blocks: 85330
  Show dependency treegraph
 
Reported: 2012-08-22 08:17 PDT by Kentaro Hara
Modified: 2012-08-22 17:38 PDT (History)
5 users (show)

See Also:


Attachments
Patch (17.67 KB, patch)
2012-08-22 08:21 PDT, Kentaro Hara
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kentaro Hara 2012-08-22 08:17:46 PDT
V8DOMWrapper::instantiateV8Object() should receive Frame* instead of V8Proxy*.
Comment 1 Kentaro Hara 2012-08-22 08:21:04 PDT
Created attachment 159939 [details]
Patch
Comment 2 Kentaro Hara 2012-08-22 08:22:21 PDT
Comment on attachment 159939 [details]
Patch

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

> Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:3408
> +    wrapper = V8DOMWrapper::instantiateV8Object(proxy ? proxy->frame() : 0, &info, impl.get());

'proxy' will be removed from CodeGeneratorV8.pm in a follow-up patch (because removing 'proxy' is not so trivial).
Comment 3 Adam Barth 2012-08-22 12:28:54 PDT
Comment on attachment 159939 [details]
Patch

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

> Source/WebCore/bindings/v8/V8DOMWrapper.cpp:163
> -v8::Local<v8::Object> V8DOMWrapper::instantiateV8Object(V8Proxy* proxy, WrapperTypeInfo* type, void* impl)
> +v8::Local<v8::Object> V8DOMWrapper::instantiateV8Object(Frame* frame, WrapperTypeInfo* type, void* impl)

This should actually take a ScriptExecutionContext, but Frame is better than V8Proxy :)

> Source/WebCore/bindings/v8/V8DOMWrapper.cpp:175
> -                Frame* frame = V8DOMWindow::toNative(globalPrototype)->frame();
> -                if (frame && frame->script()->canExecuteScripts(NotAboutToExecuteScript))
> -                    proxy = frame->script()->proxy();
> +                Frame* globalFrame = V8DOMWindow::toNative(globalPrototype)->frame();
> +                if (globalFrame && globalFrame->script()->canExecuteScripts(NotAboutToExecuteScript))
> +                    frame = globalFrame;

This code is wrong, but we can fix that in another patch.  Can you file a bug about V8DOMWrapper::instantiateV8Object needing to take a ScriptExecutionContext ?
Comment 4 WebKit Review Bot 2012-08-22 15:44:11 PDT
Comment on attachment 159939 [details]
Patch

Clearing flags on attachment: 159939

Committed r126362: <http://trac.webkit.org/changeset/126362>
Comment 5 WebKit Review Bot 2012-08-22 15:44:14 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Kentaro Hara 2012-08-22 17:38:00 PDT
(In reply to comment #3)
> This code is wrong, but we can fix that in another patch.  Can you file a bug about V8DOMWrapper::instantiateV8Object needing to take a ScriptExecutionContext ?

Filed a bug 94763.