Changeset 118134 in webkit


Ignore:
Timestamp:
May 23, 2012 12:11:23 AM (12 years ago)
Author:
haraken@chromium.org
Message:

[V8] Pass Isolate to v8::Null() in custom bindings (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=87209

Reviewed by Adam Barth.

The objective is to pass Isolate around in V8 bindings.
This patch passes Isolate to v8::Null() in custom bindings.

No tests. No change in behavior.

  • bindings/v8/custom/V8HTMLElementCustom.cpp:

(WebCore::toV8Object):
(WebCore::toV8):

  • bindings/v8/custom/V8HistoryCustom.cpp:

(WebCore::V8History::stateAccessorGetter):

  • bindings/v8/custom/V8IDBAnyCustom.cpp:

(WebCore::toV8):

  • bindings/v8/custom/V8IDBKeyCustom.cpp:

(WebCore::toV8):

  • bindings/v8/custom/V8ImageDataCustom.cpp:

(WebCore::toV8):

  • bindings/v8/custom/V8Int16ArrayCustom.cpp:

(WebCore::toV8):

  • bindings/v8/custom/V8Int32ArrayCustom.cpp:

(WebCore::toV8):

  • bindings/v8/custom/V8Int8ArrayCustom.cpp:

(WebCore::toV8):

  • bindings/v8/custom/V8LocationCustom.cpp:

(WebCore::toV8):

  • bindings/v8/custom/V8MessageEventCustom.cpp:

(WebCore::V8MessageEvent::dataAccessorGetter):

  • bindings/v8/custom/V8NamedNodeMapCustom.cpp:

(WebCore::toV8):

  • bindings/v8/custom/V8NodeCustom.cpp:

(WebCore::V8Node::insertBeforeCallback):
(WebCore::V8Node::replaceChildCallback):
(WebCore::V8Node::removeChildCallback):
(WebCore::V8Node::appendChildCallback):
(WebCore::toV8Slow):

  • bindings/v8/custom/V8PopStateEventCustom.cpp:

(WebCore::V8PopStateEvent::stateAccessorGetter):

  • bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:

(WebCore::V8SQLResultSetRowList::itemCallback):

  • bindings/v8/custom/V8SVGDocumentCustom.cpp:

(WebCore::toV8):

  • bindings/v8/custom/V8SVGElementCustom.cpp:

(WebCore::toV8):

  • bindings/v8/custom/V8SVGPathSegCustom.cpp:

(WebCore::toV8):

  • bindings/v8/custom/V8ScriptProfileCustom.cpp:

(WebCore::toV8):

  • bindings/v8/custom/V8ScriptProfileNodeCustom.cpp:

(WebCore::toV8):

  • bindings/v8/custom/V8StyleSheetCustom.cpp:

(WebCore::toV8):

  • bindings/v8/custom/V8TrackEventCustom.cpp:

(WebCore::V8TrackEvent::trackAccessorGetter):

  • bindings/v8/custom/V8Uint16ArrayCustom.cpp:

(WebCore::toV8):

  • bindings/v8/custom/V8Uint32ArrayCustom.cpp:

(WebCore::toV8):

  • bindings/v8/custom/V8Uint8ArrayCustom.cpp:

(WebCore::toV8):

  • bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp:

(WebCore::toV8):

  • bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:

(WebCore::toV8Object):
(WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
(WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):

  • bindings/v8/custom/V8WorkerContextCustom.cpp:

(WebCore::toV8):

Location:
trunk/Source/WebCore
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r118133 r118134  
     12012-05-23  Kentaro Hara  <haraken@chromium.org>
     2
     3        [V8] Pass Isolate to v8::Null() in custom bindings (Part 2)
     4        https://bugs.webkit.org/show_bug.cgi?id=87209
     5
     6        Reviewed by Adam Barth.
     7
     8        The objective is to pass Isolate around in V8 bindings.
     9        This patch passes Isolate to v8::Null() in custom bindings.
     10
     11        No tests. No change in behavior.
     12
     13        * bindings/v8/custom/V8HTMLElementCustom.cpp:
     14        (WebCore::toV8Object):
     15        (WebCore::toV8):
     16        * bindings/v8/custom/V8HistoryCustom.cpp:
     17        (WebCore::V8History::stateAccessorGetter):
     18        * bindings/v8/custom/V8IDBAnyCustom.cpp:
     19        (WebCore::toV8):
     20        * bindings/v8/custom/V8IDBKeyCustom.cpp:
     21        (WebCore::toV8):
     22        * bindings/v8/custom/V8ImageDataCustom.cpp:
     23        (WebCore::toV8):
     24        * bindings/v8/custom/V8Int16ArrayCustom.cpp:
     25        (WebCore::toV8):
     26        * bindings/v8/custom/V8Int32ArrayCustom.cpp:
     27        (WebCore::toV8):
     28        * bindings/v8/custom/V8Int8ArrayCustom.cpp:
     29        (WebCore::toV8):
     30        * bindings/v8/custom/V8LocationCustom.cpp:
     31        (WebCore::toV8):
     32        * bindings/v8/custom/V8MessageEventCustom.cpp:
     33        (WebCore::V8MessageEvent::dataAccessorGetter):
     34        * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
     35        (WebCore::toV8):
     36        * bindings/v8/custom/V8NodeCustom.cpp:
     37        (WebCore::V8Node::insertBeforeCallback):
     38        (WebCore::V8Node::replaceChildCallback):
     39        (WebCore::V8Node::removeChildCallback):
     40        (WebCore::V8Node::appendChildCallback):
     41        (WebCore::toV8Slow):
     42        * bindings/v8/custom/V8PopStateEventCustom.cpp:
     43        (WebCore::V8PopStateEvent::stateAccessorGetter):
     44        * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
     45        (WebCore::V8SQLResultSetRowList::itemCallback):
     46        * bindings/v8/custom/V8SVGDocumentCustom.cpp:
     47        (WebCore::toV8):
     48        * bindings/v8/custom/V8SVGElementCustom.cpp:
     49        (WebCore::toV8):
     50        * bindings/v8/custom/V8SVGPathSegCustom.cpp:
     51        (WebCore::toV8):
     52        * bindings/v8/custom/V8ScriptProfileCustom.cpp:
     53        (WebCore::toV8):
     54        * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp:
     55        (WebCore::toV8):
     56        * bindings/v8/custom/V8StyleSheetCustom.cpp:
     57        (WebCore::toV8):
     58        * bindings/v8/custom/V8TrackEventCustom.cpp:
     59        (WebCore::V8TrackEvent::trackAccessorGetter):
     60        * bindings/v8/custom/V8Uint16ArrayCustom.cpp:
     61        (WebCore::toV8):
     62        * bindings/v8/custom/V8Uint32ArrayCustom.cpp:
     63        (WebCore::toV8):
     64        * bindings/v8/custom/V8Uint8ArrayCustom.cpp:
     65        (WebCore::toV8):
     66        * bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp:
     67        (WebCore::toV8):
     68        * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
     69        (WebCore::toV8Object):
     70        (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
     71        (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):
     72        * bindings/v8/custom/V8WorkerContextCustom.cpp:
     73        (WebCore::toV8):
     74
    1752012-05-23  Kentaro Hara  <haraken@chromium.org>
    276
  • trunk/Source/WebCore/bindings/v8/custom/V8HTMLElementCustom.cpp

    r117371 r118134  
    4545{
    4646    if (!itemValue)
    47         return v8::Null();
     47        return v8::Null(isolate);
    4848
    4949    if (itemValue->isNode())
     
    5757{
    5858    if (!impl)
    59         return v8::Null();
     59        return v8::Null(isolate);
    6060    return createV8HTMLWrapper(impl, isolate, forceNewObject);
    6161}
  • trunk/Source/WebCore/bindings/v8/custom/V8HistoryCustom.cpp

    r117734 r118134  
    5454
    5555    SerializedScriptValue* serialized = history->state();
    56     value = serialized ? serialized->deserialize(0, info.GetIsolate()) : v8::Handle<v8::Value>(v8::Null());
     56    value = serialized ? serialized->deserialize(0, info.GetIsolate()) : v8::Handle<v8::Value>(v8::Null(info.GetIsolate()));
    5757    info.Holder()->SetHiddenValue(V8HiddenPropertyName::state(), value);
    5858
  • trunk/Source/WebCore/bindings/v8/custom/V8IDBAnyCustom.cpp

    r117817 r118134  
    4949{
    5050    if (!impl)
    51         return v8::Null();
     51        return v8::Null(isolate);
    5252
    5353    switch (impl->type()) {
     
    5555        return v8::Undefined();
    5656    case IDBAny::NullType:
    57         return v8::Null();
     57        return v8::Null(isolate);
    5858    case IDBAny::DOMStringListType:
    5959        return toV8(impl->domStringList(), isolate);
  • trunk/Source/WebCore/bindings/v8/custom/V8IDBKeyCustom.cpp

    r114907 r118134  
    4242{
    4343    if (!key)
    44         return v8::Null();
     44        return v8::Null(isolate);
    4545
    4646    switch (key->type()) {
  • trunk/Source/WebCore/bindings/v8/custom/V8ImageDataCustom.cpp

    r115366 r118134  
    3939{
    4040    if (!impl)
    41         return v8::Null();
     41        return v8::Null(isolate);
    4242    v8::Handle<v8::Object> wrapper = V8ImageData::wrap(impl, isolate);
    4343    if (!wrapper.IsEmpty()) {
  • trunk/Source/WebCore/bindings/v8/custom/V8Int16ArrayCustom.cpp

    r115366 r118134  
    5757{
    5858    if (!impl)
    59         return v8::Null();
     59        return v8::Null(isolate);
    6060    v8::Handle<v8::Object> wrapper = V8Int16Array::wrap(impl, isolate);
    6161    if (!wrapper.IsEmpty())
  • trunk/Source/WebCore/bindings/v8/custom/V8Int32ArrayCustom.cpp

    r115366 r118134  
    5757{
    5858    if (!impl)
    59         return v8::Null();
     59        return v8::Null(isolate);
    6060    v8::Handle<v8::Object> wrapper = V8Int32Array::wrap(impl, isolate);
    6161    if (!wrapper.IsEmpty())
  • trunk/Source/WebCore/bindings/v8/custom/V8Int8ArrayCustom.cpp

    r115366 r118134  
    5757{
    5858    if (!impl)
    59         return v8::Null();
     59        return v8::Null(isolate);
    6060    v8::Handle<v8::Object> wrapper = V8Int8Array::wrap(impl, isolate);
    6161    if (!wrapper.IsEmpty())
  • trunk/Source/WebCore/bindings/v8/custom/V8LocationCustom.cpp

    r115372 r118134  
    276276{
    277277    if (!impl)
    278         return v8::Null();
     278        return v8::Null(isolate);
    279279    v8::Handle<v8::Object> wrapper = getDOMObjectMap().get(impl);
    280280    if (wrapper.IsEmpty()) {
  • trunk/Source/WebCore/bindings/v8/custom/V8MessageEventCustom.cpp

    r115234 r118134  
    5454        ScriptValue scriptValue = event->dataAsScriptValue();
    5555        if (scriptValue.hasNoValue())
    56             result = v8::Null();
     56            result = v8::Null(info.GetIsolate());
    5757        else
    5858            result = v8::Local<v8::Value>::New(scriptValue.v8Value());
     
    6464            result = serializedValue->deserialize(event->ports(), info.GetIsolate());
    6565        else
    66             result = v8::Null();
     66            result = v8::Null(info.GetIsolate());
    6767        break;
    6868
  • trunk/Source/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp

    r117873 r118134  
    7575{
    7676    if (!impl)
    77         return v8::Null();
     77        return v8::Null(isolate);
    7878    v8::Handle<v8::Object> wrapper = V8NamedNodeMap::wrap(impl, isolate);
    7979    // Add a hidden reference from named node map to its owner node.
  • trunk/Source/WebCore/bindings/v8/custom/V8NodeCustom.cpp

    r118063 r118134  
    7878    if (success)
    7979        return args[0];
    80     return v8::Null();
     80    return v8::Null(args.GetIsolate());
    8181}
    8282
     
    9595    if (success)
    9696        return args[1];
    97     return v8::Null();
     97    return v8::Null(args.GetIsolate());
    9898}
    9999
     
    110110    if (success)
    111111        return args[0];
    112     return v8::Null();
     112    return v8::Null(args.GetIsolate());
    113113}
    114114
     
    126126    if (success)
    127127        return args[0];
    128     return v8::Null();
     128    return v8::Null(args.GetIsolate());
    129129}
    130130
     
    132132{
    133133    if (!impl)
    134         return v8::Null();
     134        return v8::Null(isolate);
    135135
    136136    if (!forceNewObject) {
  • trunk/Source/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp

    r115234 r118134  
    6363    History* history = event->history();
    6464    if (!history || !event->serializedState())
    65         return cacheState(info.Holder(), v8::Null());
     65        return cacheState(info.Holder(), v8::Null(info.GetIsolate()));
    6666
    6767    // There's no cached value from a previous invocation, nor a state value was provided by the
  • trunk/Source/WebCore/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp

    r118071 r118134  
    6868                break;
    6969            case SQLValue::NullValue:
    70                 value = v8::Null();
     70                value = v8::Null(args.GetIsolate());
    7171                break;
    7272            case SQLValue::NumberValue:
  • trunk/Source/WebCore/bindings/v8/custom/V8SVGDocumentCustom.cpp

    r114911 r118134  
    4242{
    4343    if (!impl)
    44         return v8::Null();
     44        return v8::Null(isolate);
    4545    v8::Handle<v8::Object> wrapper = V8SVGDocument::wrap(impl, isolate, forceNewObject);
    4646    if (wrapper.IsEmpty())
  • trunk/Source/WebCore/bindings/v8/custom/V8SVGElementCustom.cpp

    r117375 r118134  
    4141{
    4242    if (!impl)
    43         return v8::Null();
     43        return v8::Null(isolate);
    4444    return createV8SVGWrapper(impl, isolate, forceNewObject);
    4545}
  • trunk/Source/WebCore/bindings/v8/custom/V8SVGPathSegCustom.cpp

    r115372 r118134  
    6161{
    6262    if (!impl)
    63         return v8::Null();
     63        return v8::Null(isolate);
    6464    switch (impl->pathSegType()) {
    6565    case SVGPathSeg::PATHSEG_CLOSEPATH:
  • trunk/Source/WebCore/bindings/v8/custom/V8ScriptProfileCustom.cpp

    r114907 r118134  
    4545{
    4646    if (!impl)
    47         return v8::Null();
     47        return v8::Null(isolate);
    4848    v8::Local<v8::Function> function = V8ScriptProfile::GetTemplate()->GetFunction();
    4949    if (function.IsEmpty()) {
  • trunk/Source/WebCore/bindings/v8/custom/V8ScriptProfileNodeCustom.cpp

    r114907 r118134  
    5252{
    5353    if (!impl)
    54         return v8::Null();
     54        return v8::Null(isolate);
    5555    v8::Local<v8::Function> function = V8ScriptProfileNode::GetTemplate()->GetFunction();
    5656    if (function.IsEmpty()) {
  • trunk/Source/WebCore/bindings/v8/custom/V8StyleSheetCustom.cpp

    r115372 r118134  
    4141{
    4242    if (!impl)
    43         return v8::Null();
     43        return v8::Null(isolate);
    4444    if (impl->isCSSStyleSheet())
    4545        return toV8(static_cast<CSSStyleSheet*>(impl), isolate);
  • trunk/Source/WebCore/bindings/v8/custom/V8TrackEventCustom.cpp

    r114972 r118134  
    4949   
    5050    if (!track)
    51         return v8::Null();
     51        return v8::Null(info.GetIsolate());
    5252
    5353    switch (track->type()) {
     
    6868    }
    6969
    70     return v8::Null();
     70    return v8::Null(info.GetIsolate());
    7171}
    7272
  • trunk/Source/WebCore/bindings/v8/custom/V8Uint16ArrayCustom.cpp

    r115372 r118134  
    5757{
    5858    if (!impl)
    59         return v8::Null();
     59        return v8::Null(isolate);
    6060    v8::Handle<v8::Object> wrapper = V8Uint16Array::wrap(impl, isolate);
    6161    if (!wrapper.IsEmpty())
  • trunk/Source/WebCore/bindings/v8/custom/V8Uint32ArrayCustom.cpp

    r115372 r118134  
    5757{
    5858    if (!impl)
    59         return v8::Null();
     59        return v8::Null(isolate);
    6060    v8::Handle<v8::Object> wrapper = V8Uint32Array::wrap(impl, isolate);
    6161    if (!wrapper.IsEmpty())
  • trunk/Source/WebCore/bindings/v8/custom/V8Uint8ArrayCustom.cpp

    r115372 r118134  
    5757{
    5858    if (!impl)
    59         return v8::Null();
     59        return v8::Null(isolate);
    6060    v8::Handle<v8::Object> wrapper = V8Uint8Array::wrap(impl, isolate);
    6161    if (!wrapper.IsEmpty())
  • trunk/Source/WebCore/bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp

    r115372 r118134  
    5454{
    5555    if (!impl)
    56         return v8::Null();
     56        return v8::Null(isolate);
    5757    v8::Handle<v8::Object> wrapper = V8Uint8ClampedArray::wrap(impl, isolate);
    5858    if (!wrapper.IsEmpty())
  • trunk/Source/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp

    r118063 r118134  
    133133        return v8::Integer::New(info.getInt());
    134134    case WebGLGetInfo::kTypeNull:
    135         return v8::Null();
     135        return v8::Null(isolate);
    136136    case WebGLGetInfo::kTypeString:
    137137        return v8::String::New(fromWebCoreString(info.getString()), info.getString().length());
     
    169169{
    170170    if (!extension)
    171         return v8::Null();
     171        return v8::Null(isolate);
    172172    v8::Handle<v8::Value> extensionObject;
    173173    const char* referenceName = 0;
     
    279279    if (ec) {
    280280        V8Proxy::setDOMException(ec, args.GetIsolate());
    281         return v8::Null();
     281        return v8::Null(args.GetIsolate());
    282282    }
    283283    if (!succeed)
    284         return v8::Null();
     284        return v8::Null(args.GetIsolate());
    285285    v8::Local<v8::Array> array = v8::Array::New(shaders.size());
    286286    for (size_t ii = 0; ii < shaders.size(); ++ii)
     
    389389    WebGLRenderingContext* imp = V8WebGLRenderingContext::toNative(args.Holder());
    390390    if (imp->isContextLost())
    391         return v8::Null();
     391        return v8::Null(args.GetIsolate());
    392392
    393393    Vector<String> value = imp->getSupportedExtensions();
  • trunk/Source/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp

    r117734 r118134  
    128128{
    129129    if (!impl)
    130         return v8::Null();
     130        return v8::Null(isolate);
    131131
    132132    WorkerContextExecutionProxy* proxy = impl->script()->proxy();
    133133    if (!proxy)
    134         return v8::Null();
     134        return v8::Null(isolate);
    135135
    136136    v8::Handle<v8::Object> global = proxy->context()->Global();
Note: See TracChangeset for help on using the changeset viewer.