Changeset 126393 in webkit


Ignore:
Timestamp:
Aug 22, 2012 10:59:23 PM (12 years ago)
Author:
haraken@chromium.org
Message:

[V8] Remove V8Proxy from CodeGeneratorV8.pm
https://bugs.webkit.org/show_bug.cgi?id=94773

Reviewed by Adam Barth.

To kill V8Proxy, we can remove V8Proxy uses from CodeGeneratorV8.pm.

No tests. No change in behavior.

  • bindings/scripts/CodeGeneratorV8.pm:

(GenerateToV8Converters):

  • bindings/scripts/test/V8/V8Float64Array.cpp:

(WebCore::V8Float64Array::wrapSlow):

  • bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:

(WebCore::V8TestActiveDOMObject::wrapSlow):

  • bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:

(WebCore::V8TestCustomNamedGetter::wrapSlow):

  • bindings/scripts/test/V8/V8TestEventConstructor.cpp:

(WebCore::V8TestEventConstructor::wrapSlow):

  • bindings/scripts/test/V8/V8TestEventTarget.cpp:

(WebCore::V8TestEventTarget::wrapSlow):

  • bindings/scripts/test/V8/V8TestException.cpp:

(WebCore::V8TestException::wrapSlow):

  • bindings/scripts/test/V8/V8TestInterface.cpp:

(WebCore::V8TestInterface::wrapSlow):

  • bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:

(WebCore::V8TestMediaQueryListListener::wrapSlow):

  • bindings/scripts/test/V8/V8TestNamedConstructor.cpp:

(WebCore::V8TestNamedConstructor::wrapSlow):

  • bindings/scripts/test/V8/V8TestNode.cpp:

(WebCore::V8TestNode::wrapSlow):

  • bindings/scripts/test/V8/V8TestObj.cpp:

(WebCore::V8TestObj::wrapSlow):

  • bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:

(WebCore::V8TestSerializedScriptValueInterface::wrapSlow):

Location:
trunk/Source/WebCore
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r126392 r126393  
     12012-08-22  Kentaro Hara  <haraken@chromium.org>
     2
     3        [V8] Remove V8Proxy from CodeGeneratorV8.pm
     4        https://bugs.webkit.org/show_bug.cgi?id=94773
     5
     6        Reviewed by Adam Barth.
     7
     8        To kill V8Proxy, we can remove V8Proxy uses from CodeGeneratorV8.pm.
     9
     10        No tests. No change in behavior.
     11
     12        * bindings/scripts/CodeGeneratorV8.pm:
     13        (GenerateToV8Converters):
     14        * bindings/scripts/test/V8/V8Float64Array.cpp:
     15        (WebCore::V8Float64Array::wrapSlow):
     16        * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
     17        (WebCore::V8TestActiveDOMObject::wrapSlow):
     18        * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
     19        (WebCore::V8TestCustomNamedGetter::wrapSlow):
     20        * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
     21        (WebCore::V8TestEventConstructor::wrapSlow):
     22        * bindings/scripts/test/V8/V8TestEventTarget.cpp:
     23        (WebCore::V8TestEventTarget::wrapSlow):
     24        * bindings/scripts/test/V8/V8TestException.cpp:
     25        (WebCore::V8TestException::wrapSlow):
     26        * bindings/scripts/test/V8/V8TestInterface.cpp:
     27        (WebCore::V8TestInterface::wrapSlow):
     28        * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
     29        (WebCore::V8TestMediaQueryListListener::wrapSlow):
     30        * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
     31        (WebCore::V8TestNamedConstructor::wrapSlow):
     32        * bindings/scripts/test/V8/V8TestNode.cpp:
     33        (WebCore::V8TestNode::wrapSlow):
     34        * bindings/scripts/test/V8/V8TestObj.cpp:
     35        (WebCore::V8TestObj::wrapSlow):
     36        * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
     37        (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
     38
    1392012-08-22  Sukolsak Sakshuwong  <sukolsak@google.com>
    240
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm

    r126375 r126393  
    33533353    }
    33543354
    3355     my $proxyInit;
     3355    AddToImplIncludes("Frame.h");
     3356    my $frame = "0";
    33563357    if (IsNodeSubType($dataNode)) {
    3357         AddToImplIncludes("Frame.h");
    3358         $proxyInit = "impl->document()->frame() ? impl->document()->frame()->script()->proxy() : 0";
    33593358        # DocumentType nodes are the only nodes that may have a NULL document.
    33603359        if ($interfaceName eq "DocumentType") {
    3361             $proxyInit = "impl->document() ? ($proxyInit) : 0";
    3362         }
    3363     } else {
    3364         $proxyInit = "0";
     3360            $frame = "impl->document() ? impl->document()->frame() : 0";
     3361        } else {
     3362            $frame = "impl->document()->frame()";
     3363        }
    33653364    }
    33663365    push(@implContent, <<END);
    3367     V8Proxy* proxy = $proxyInit;
     3366    Frame* frame = $frame;
    33683367END
    33693368
    33703369    if (IsSubType($dataNode, "Document")) {
    33713370        push(@implContent, <<END);
    3372     if (proxy && proxy->windowShell()->context().IsEmpty() && proxy->windowShell()->initContextIfNeeded()) {
     3371    if (frame && frame->script()->windowShell()->context().IsEmpty() && frame->script()->windowShell()->initContextIfNeeded()) {
    33733372        // initContextIfNeeded may have created a wrapper for the object, retry from the start.
    33743373        return ${className}::wrap(impl.get(), isolate);
     
    33843383        push(@implContent, <<END);
    33853384    if (impl->frame()) {
    3386         proxy = impl->frame()->script()->proxy();
    3387         proxy->windowShell()->initContextIfNeeded();
     3385        frame = impl->frame();
     3386        frame->script()->windowShell()->initContextIfNeeded();
    33883387    }
    33893388END
     
    33953394    // Enter the node's context and create the wrapper in that context.
    33963395    v8::Handle<v8::Context> context;
    3397     if (proxy && !proxy->frame()->script()->matchesCurrentContext()) {
     3396    if (frame && !frame->script()->matchesCurrentContext()) {
    33983397        // For performance, we enter the context only if the currently running context
    33993398        // is different from the context that we are about to enter.
    3400         context = proxy->frame()->script()->currentWorldContext();
     3399        context = frame->script()->currentWorldContext();
    34013400        if (!context.IsEmpty())
    34023401            context->Enter();
     
    34063405
    34073406    push(@implContent, <<END);
    3408     wrapper = V8DOMWrapper::instantiateV8Object(proxy ? proxy->frame() : 0, &info, impl.get());
     3407    wrapper = V8DOMWrapper::instantiateV8Object(frame, &info, impl.get());
    34093408END
    34103409    if (IsNodeSubType($dataNode) || IsVisibleAcrossOrigins($dataNode)) {
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp

    r126362 r126393  
    2525#include "ContextFeatures.h"
    2626#include "ExceptionCode.h"
     27#include "Frame.h"
    2728#include "RuntimeEnabledFeatures.h"
    2829#include "V8ArrayBufferView.h"
     
    152153    v8::Handle<v8::Object> wrapper;
    153154    ASSERT(static_cast<void*>(static_cast<ArrayBufferView*>(impl.get())) == static_cast<void*>(impl.get()));
    154     V8Proxy* proxy = 0;
    155     wrapper = V8DOMWrapper::instantiateV8Object(proxy ? proxy->frame() : 0, &info, impl.get());
     155    Frame* frame = 0;
     156    wrapper = V8DOMWrapper::instantiateV8Object(frame, &info, impl.get());
    156157    if (UNLIKELY(wrapper.IsEmpty()))
    157158        return wrapper;
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp

    r126370 r126393  
    181181{
    182182    v8::Handle<v8::Object> wrapper;
    183     V8Proxy* proxy = 0;
     183    Frame* frame = 0;
    184184    if (impl->frame()) {
    185         proxy = impl->frame()->script()->proxy();
    186         proxy->windowShell()->initContextIfNeeded();
     185        frame = impl->frame();
     186        frame->script()->windowShell()->initContextIfNeeded();
    187187    }
    188188
    189189    // Enter the node's context and create the wrapper in that context.
    190190    v8::Handle<v8::Context> context;
    191     if (proxy && !proxy->frame()->script()->matchesCurrentContext()) {
     191    if (frame && !frame->script()->matchesCurrentContext()) {
    192192        // For performance, we enter the context only if the currently running context
    193193        // is different from the context that we are about to enter.
    194         context = proxy->frame()->script()->currentWorldContext();
     194        context = frame->script()->currentWorldContext();
    195195        if (!context.IsEmpty())
    196196            context->Enter();
    197197    }
    198     wrapper = V8DOMWrapper::instantiateV8Object(proxy ? proxy->frame() : 0, &info, impl.get());
     198    wrapper = V8DOMWrapper::instantiateV8Object(frame, &info, impl.get());
    199199    // Exit the node's context if it was entered.
    200200    if (!context.IsEmpty())
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp

    r126362 r126393  
    2525#include "ContextFeatures.h"
    2626#include "ExceptionCode.h"
     27#include "Frame.h"
    2728#include "RuntimeEnabledFeatures.h"
    2829#include "V8Binding.h"
     
    114115{
    115116    v8::Handle<v8::Object> wrapper;
    116     V8Proxy* proxy = 0;
    117     wrapper = V8DOMWrapper::instantiateV8Object(proxy ? proxy->frame() : 0, &info, impl.get());
     117    Frame* frame = 0;
     118    wrapper = V8DOMWrapper::instantiateV8Object(frame, &info, impl.get());
    118119    if (UNLIKELY(wrapper.IsEmpty()))
    119120        return wrapper;
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp

    r126362 r126393  
    2525#include "ContextFeatures.h"
    2626#include "Dictionary.h"
     27#include "Frame.h"
    2728#include "RuntimeEnabledFeatures.h"
    2829#include "V8Binding.h"
     
    151152{
    152153    v8::Handle<v8::Object> wrapper;
    153     V8Proxy* proxy = 0;
    154     wrapper = V8DOMWrapper::instantiateV8Object(proxy ? proxy->frame() : 0, &info, impl.get());
     154    Frame* frame = 0;
     155    wrapper = V8DOMWrapper::instantiateV8Object(frame, &info, impl.get());
    155156    if (UNLIKELY(wrapper.IsEmpty()))
    156157        return wrapper;
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp

    r126362 r126393  
    2525#include "ContextFeatures.h"
    2626#include "ExceptionCode.h"
     27#include "Frame.h"
    2728#include "RuntimeEnabledFeatures.h"
    2829#include "V8Binding.h"
     
    175176{
    176177    v8::Handle<v8::Object> wrapper;
    177     V8Proxy* proxy = 0;
    178     wrapper = V8DOMWrapper::instantiateV8Object(proxy ? proxy->frame() : 0, &info, impl.get());
     178    Frame* frame = 0;
     179    wrapper = V8DOMWrapper::instantiateV8Object(frame, &info, impl.get());
    179180    if (UNLIKELY(wrapper.IsEmpty()))
    180181        return wrapper;
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestException.cpp

    r126362 r126393  
    2424#include "BindingState.h"
    2525#include "ContextFeatures.h"
     26#include "Frame.h"
    2627#include "RuntimeEnabledFeatures.h"
    2728#include "V8Binding.h"
     
    105106{
    106107    v8::Handle<v8::Object> wrapper;
    107     V8Proxy* proxy = 0;
    108     wrapper = V8DOMWrapper::instantiateV8Object(proxy ? proxy->frame() : 0, &info, impl.get());
     108    Frame* frame = 0;
     109    wrapper = V8DOMWrapper::instantiateV8Object(frame, &info, impl.get());
    109110    if (UNLIKELY(wrapper.IsEmpty()))
    110111        return wrapper;
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp

    r126362 r126393  
    2727#include "ContextFeatures.h"
    2828#include "ExceptionCode.h"
     29#include "Frame.h"
    2930#include "RuntimeEnabledFeatures.h"
    3031#include "TestSupplemental.h"
     
    348349{
    349350    v8::Handle<v8::Object> wrapper;
    350     V8Proxy* proxy = 0;
    351     wrapper = V8DOMWrapper::instantiateV8Object(proxy ? proxy->frame() : 0, &info, impl.get());
     351    Frame* frame = 0;
     352    wrapper = V8DOMWrapper::instantiateV8Object(frame, &info, impl.get());
    352353    if (UNLIKELY(wrapper.IsEmpty()))
    353354        return wrapper;
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp

    r126362 r126393  
    2525#include "ContextFeatures.h"
    2626#include "ExceptionCode.h"
     27#include "Frame.h"
    2728#include "MediaQueryListListener.h"
    2829#include "RuntimeEnabledFeatures.h"
     
    114115{
    115116    v8::Handle<v8::Object> wrapper;
    116     V8Proxy* proxy = 0;
    117     wrapper = V8DOMWrapper::instantiateV8Object(proxy ? proxy->frame() : 0, &info, impl.get());
     117    Frame* frame = 0;
     118    wrapper = V8DOMWrapper::instantiateV8Object(frame, &info, impl.get());
    118119    if (UNLIKELY(wrapper.IsEmpty()))
    119120        return wrapper;
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp

    r126362 r126393  
    159159{
    160160    v8::Handle<v8::Object> wrapper;
    161     V8Proxy* proxy = 0;
    162     wrapper = V8DOMWrapper::instantiateV8Object(proxy ? proxy->frame() : 0, &info, impl.get());
     161    Frame* frame = 0;
     162    wrapper = V8DOMWrapper::instantiateV8Object(frame, &info, impl.get());
    163163    if (UNLIKELY(wrapper.IsEmpty()))
    164164        return wrapper;
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp

    r126370 r126393  
    115115    v8::Handle<v8::Object> wrapper;
    116116    ASSERT(static_cast<void*>(static_cast<Node*>(impl.get())) == static_cast<void*>(impl.get()));
    117     V8Proxy* proxy = impl->document()->frame() ? impl->document()->frame()->script()->proxy() : 0;
     117    Frame* frame = impl->document()->frame();
    118118
    119119    // Enter the node's context and create the wrapper in that context.
    120120    v8::Handle<v8::Context> context;
    121     if (proxy && !proxy->frame()->script()->matchesCurrentContext()) {
     121    if (frame && !frame->script()->matchesCurrentContext()) {
    122122        // For performance, we enter the context only if the currently running context
    123123        // is different from the context that we are about to enter.
    124         context = proxy->frame()->script()->currentWorldContext();
     124        context = frame->script()->currentWorldContext();
    125125        if (!context.IsEmpty())
    126126            context->Enter();
    127127    }
    128     wrapper = V8DOMWrapper::instantiateV8Object(proxy ? proxy->frame() : 0, &info, impl.get());
     128    wrapper = V8DOMWrapper::instantiateV8Object(frame, &info, impl.get());
    129129    // Exit the node's context if it was entered.
    130130    if (!context.IsEmpty())
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp

    r126362 r126393  
    2727#include "Dictionary.h"
    2828#include "ExceptionCode.h"
     29#include "Frame.h"
    2930#include "HTMLNames.h"
    3031#include "IDBBindingUtilities.h"
     
    23212322{
    23222323    v8::Handle<v8::Object> wrapper;
    2323     V8Proxy* proxy = 0;
    2324     wrapper = V8DOMWrapper::instantiateV8Object(proxy ? proxy->frame() : 0, &info, impl.get());
     2324    Frame* frame = 0;
     2325    wrapper = V8DOMWrapper::instantiateV8Object(frame, &info, impl.get());
    23252326    if (UNLIKELY(wrapper.IsEmpty()))
    23262327        return wrapper;
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp

    r126362 r126393  
    2727#include "ContextFeatures.h"
    2828#include "ExceptionCode.h"
     29#include "Frame.h"
    2930#include "MessagePort.h"
    3031#include "RuntimeEnabledFeatures.h"
     
    297298{
    298299    v8::Handle<v8::Object> wrapper;
    299     V8Proxy* proxy = 0;
    300     wrapper = V8DOMWrapper::instantiateV8Object(proxy ? proxy->frame() : 0, &info, impl.get());
     300    Frame* frame = 0;
     301    wrapper = V8DOMWrapper::instantiateV8Object(frame, &info, impl.get());
    301302    if (UNLIKELY(wrapper.IsEmpty()))
    302303        return wrapper;
Note: See TracChangeset for help on using the changeset viewer.