Changeset 118134 in webkit
- Timestamp:
- May 23, 2012 12:11:23 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r118133 r118134 1 2012-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 1 75 2012-05-23 Kentaro Hara <haraken@chromium.org> 2 76 -
trunk/Source/WebCore/bindings/v8/custom/V8HTMLElementCustom.cpp
r117371 r118134 45 45 { 46 46 if (!itemValue) 47 return v8::Null( );47 return v8::Null(isolate); 48 48 49 49 if (itemValue->isNode()) … … 57 57 { 58 58 if (!impl) 59 return v8::Null( );59 return v8::Null(isolate); 60 60 return createV8HTMLWrapper(impl, isolate, forceNewObject); 61 61 } -
trunk/Source/WebCore/bindings/v8/custom/V8HistoryCustom.cpp
r117734 r118134 54 54 55 55 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())); 57 57 info.Holder()->SetHiddenValue(V8HiddenPropertyName::state(), value); 58 58 -
trunk/Source/WebCore/bindings/v8/custom/V8IDBAnyCustom.cpp
r117817 r118134 49 49 { 50 50 if (!impl) 51 return v8::Null( );51 return v8::Null(isolate); 52 52 53 53 switch (impl->type()) { … … 55 55 return v8::Undefined(); 56 56 case IDBAny::NullType: 57 return v8::Null( );57 return v8::Null(isolate); 58 58 case IDBAny::DOMStringListType: 59 59 return toV8(impl->domStringList(), isolate); -
trunk/Source/WebCore/bindings/v8/custom/V8IDBKeyCustom.cpp
r114907 r118134 42 42 { 43 43 if (!key) 44 return v8::Null( );44 return v8::Null(isolate); 45 45 46 46 switch (key->type()) { -
trunk/Source/WebCore/bindings/v8/custom/V8ImageDataCustom.cpp
r115366 r118134 39 39 { 40 40 if (!impl) 41 return v8::Null( );41 return v8::Null(isolate); 42 42 v8::Handle<v8::Object> wrapper = V8ImageData::wrap(impl, isolate); 43 43 if (!wrapper.IsEmpty()) { -
trunk/Source/WebCore/bindings/v8/custom/V8Int16ArrayCustom.cpp
r115366 r118134 57 57 { 58 58 if (!impl) 59 return v8::Null( );59 return v8::Null(isolate); 60 60 v8::Handle<v8::Object> wrapper = V8Int16Array::wrap(impl, isolate); 61 61 if (!wrapper.IsEmpty()) -
trunk/Source/WebCore/bindings/v8/custom/V8Int32ArrayCustom.cpp
r115366 r118134 57 57 { 58 58 if (!impl) 59 return v8::Null( );59 return v8::Null(isolate); 60 60 v8::Handle<v8::Object> wrapper = V8Int32Array::wrap(impl, isolate); 61 61 if (!wrapper.IsEmpty()) -
trunk/Source/WebCore/bindings/v8/custom/V8Int8ArrayCustom.cpp
r115366 r118134 57 57 { 58 58 if (!impl) 59 return v8::Null( );59 return v8::Null(isolate); 60 60 v8::Handle<v8::Object> wrapper = V8Int8Array::wrap(impl, isolate); 61 61 if (!wrapper.IsEmpty()) -
trunk/Source/WebCore/bindings/v8/custom/V8LocationCustom.cpp
r115372 r118134 276 276 { 277 277 if (!impl) 278 return v8::Null( );278 return v8::Null(isolate); 279 279 v8::Handle<v8::Object> wrapper = getDOMObjectMap().get(impl); 280 280 if (wrapper.IsEmpty()) { -
trunk/Source/WebCore/bindings/v8/custom/V8MessageEventCustom.cpp
r115234 r118134 54 54 ScriptValue scriptValue = event->dataAsScriptValue(); 55 55 if (scriptValue.hasNoValue()) 56 result = v8::Null( );56 result = v8::Null(info.GetIsolate()); 57 57 else 58 58 result = v8::Local<v8::Value>::New(scriptValue.v8Value()); … … 64 64 result = serializedValue->deserialize(event->ports(), info.GetIsolate()); 65 65 else 66 result = v8::Null( );66 result = v8::Null(info.GetIsolate()); 67 67 break; 68 68 -
trunk/Source/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp
r117873 r118134 75 75 { 76 76 if (!impl) 77 return v8::Null( );77 return v8::Null(isolate); 78 78 v8::Handle<v8::Object> wrapper = V8NamedNodeMap::wrap(impl, isolate); 79 79 // Add a hidden reference from named node map to its owner node. -
trunk/Source/WebCore/bindings/v8/custom/V8NodeCustom.cpp
r118063 r118134 78 78 if (success) 79 79 return args[0]; 80 return v8::Null( );80 return v8::Null(args.GetIsolate()); 81 81 } 82 82 … … 95 95 if (success) 96 96 return args[1]; 97 return v8::Null( );97 return v8::Null(args.GetIsolate()); 98 98 } 99 99 … … 110 110 if (success) 111 111 return args[0]; 112 return v8::Null( );112 return v8::Null(args.GetIsolate()); 113 113 } 114 114 … … 126 126 if (success) 127 127 return args[0]; 128 return v8::Null( );128 return v8::Null(args.GetIsolate()); 129 129 } 130 130 … … 132 132 { 133 133 if (!impl) 134 return v8::Null( );134 return v8::Null(isolate); 135 135 136 136 if (!forceNewObject) { -
trunk/Source/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp
r115234 r118134 63 63 History* history = event->history(); 64 64 if (!history || !event->serializedState()) 65 return cacheState(info.Holder(), v8::Null( ));65 return cacheState(info.Holder(), v8::Null(info.GetIsolate())); 66 66 67 67 // 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 68 68 break; 69 69 case SQLValue::NullValue: 70 value = v8::Null( );70 value = v8::Null(args.GetIsolate()); 71 71 break; 72 72 case SQLValue::NumberValue: -
trunk/Source/WebCore/bindings/v8/custom/V8SVGDocumentCustom.cpp
r114911 r118134 42 42 { 43 43 if (!impl) 44 return v8::Null( );44 return v8::Null(isolate); 45 45 v8::Handle<v8::Object> wrapper = V8SVGDocument::wrap(impl, isolate, forceNewObject); 46 46 if (wrapper.IsEmpty()) -
trunk/Source/WebCore/bindings/v8/custom/V8SVGElementCustom.cpp
r117375 r118134 41 41 { 42 42 if (!impl) 43 return v8::Null( );43 return v8::Null(isolate); 44 44 return createV8SVGWrapper(impl, isolate, forceNewObject); 45 45 } -
trunk/Source/WebCore/bindings/v8/custom/V8SVGPathSegCustom.cpp
r115372 r118134 61 61 { 62 62 if (!impl) 63 return v8::Null( );63 return v8::Null(isolate); 64 64 switch (impl->pathSegType()) { 65 65 case SVGPathSeg::PATHSEG_CLOSEPATH: -
trunk/Source/WebCore/bindings/v8/custom/V8ScriptProfileCustom.cpp
r114907 r118134 45 45 { 46 46 if (!impl) 47 return v8::Null( );47 return v8::Null(isolate); 48 48 v8::Local<v8::Function> function = V8ScriptProfile::GetTemplate()->GetFunction(); 49 49 if (function.IsEmpty()) { -
trunk/Source/WebCore/bindings/v8/custom/V8ScriptProfileNodeCustom.cpp
r114907 r118134 52 52 { 53 53 if (!impl) 54 return v8::Null( );54 return v8::Null(isolate); 55 55 v8::Local<v8::Function> function = V8ScriptProfileNode::GetTemplate()->GetFunction(); 56 56 if (function.IsEmpty()) { -
trunk/Source/WebCore/bindings/v8/custom/V8StyleSheetCustom.cpp
r115372 r118134 41 41 { 42 42 if (!impl) 43 return v8::Null( );43 return v8::Null(isolate); 44 44 if (impl->isCSSStyleSheet()) 45 45 return toV8(static_cast<CSSStyleSheet*>(impl), isolate); -
trunk/Source/WebCore/bindings/v8/custom/V8TrackEventCustom.cpp
r114972 r118134 49 49 50 50 if (!track) 51 return v8::Null( );51 return v8::Null(info.GetIsolate()); 52 52 53 53 switch (track->type()) { … … 68 68 } 69 69 70 return v8::Null( );70 return v8::Null(info.GetIsolate()); 71 71 } 72 72 -
trunk/Source/WebCore/bindings/v8/custom/V8Uint16ArrayCustom.cpp
r115372 r118134 57 57 { 58 58 if (!impl) 59 return v8::Null( );59 return v8::Null(isolate); 60 60 v8::Handle<v8::Object> wrapper = V8Uint16Array::wrap(impl, isolate); 61 61 if (!wrapper.IsEmpty()) -
trunk/Source/WebCore/bindings/v8/custom/V8Uint32ArrayCustom.cpp
r115372 r118134 57 57 { 58 58 if (!impl) 59 return v8::Null( );59 return v8::Null(isolate); 60 60 v8::Handle<v8::Object> wrapper = V8Uint32Array::wrap(impl, isolate); 61 61 if (!wrapper.IsEmpty()) -
trunk/Source/WebCore/bindings/v8/custom/V8Uint8ArrayCustom.cpp
r115372 r118134 57 57 { 58 58 if (!impl) 59 return v8::Null( );59 return v8::Null(isolate); 60 60 v8::Handle<v8::Object> wrapper = V8Uint8Array::wrap(impl, isolate); 61 61 if (!wrapper.IsEmpty()) -
trunk/Source/WebCore/bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp
r115372 r118134 54 54 { 55 55 if (!impl) 56 return v8::Null( );56 return v8::Null(isolate); 57 57 v8::Handle<v8::Object> wrapper = V8Uint8ClampedArray::wrap(impl, isolate); 58 58 if (!wrapper.IsEmpty()) -
trunk/Source/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
r118063 r118134 133 133 return v8::Integer::New(info.getInt()); 134 134 case WebGLGetInfo::kTypeNull: 135 return v8::Null( );135 return v8::Null(isolate); 136 136 case WebGLGetInfo::kTypeString: 137 137 return v8::String::New(fromWebCoreString(info.getString()), info.getString().length()); … … 169 169 { 170 170 if (!extension) 171 return v8::Null( );171 return v8::Null(isolate); 172 172 v8::Handle<v8::Value> extensionObject; 173 173 const char* referenceName = 0; … … 279 279 if (ec) { 280 280 V8Proxy::setDOMException(ec, args.GetIsolate()); 281 return v8::Null( );281 return v8::Null(args.GetIsolate()); 282 282 } 283 283 if (!succeed) 284 return v8::Null( );284 return v8::Null(args.GetIsolate()); 285 285 v8::Local<v8::Array> array = v8::Array::New(shaders.size()); 286 286 for (size_t ii = 0; ii < shaders.size(); ++ii) … … 389 389 WebGLRenderingContext* imp = V8WebGLRenderingContext::toNative(args.Holder()); 390 390 if (imp->isContextLost()) 391 return v8::Null( );391 return v8::Null(args.GetIsolate()); 392 392 393 393 Vector<String> value = imp->getSupportedExtensions(); -
trunk/Source/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp
r117734 r118134 128 128 { 129 129 if (!impl) 130 return v8::Null( );130 return v8::Null(isolate); 131 131 132 132 WorkerContextExecutionProxy* proxy = impl->script()->proxy(); 133 133 if (!proxy) 134 return v8::Null( );134 return v8::Null(isolate); 135 135 136 136 v8::Handle<v8::Object> global = proxy->context()->Global();
Note: See TracChangeset
for help on using the changeset viewer.