Changeset 141718 in webkit
- Timestamp:
- Feb 3, 2013 3:26:25 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r141717 r141718 1 2013-02-03 Kentaro Hara <haraken@chromium.org> 2 3 [V8] Pass an Isolate to HasInstance() (part 2) 4 https://bugs.webkit.org/show_bug.cgi?id=108620 5 6 Reviewed by Adam Barth. 7 8 This is one of efforts to pass an Isolate to GetTemplate(). 9 10 No tests. No change in behavior. 11 12 * bindings/v8/custom/V8ArrayBufferViewCustom.h: 13 (WebCore::constructWebGLArray): 14 (WebCore::setWebGLArrayHelper): 15 * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp: 16 (WebCore::V8AudioBufferSourceNode::bufferAccessorSetter): 17 * bindings/v8/custom/V8BlobCustom.cpp: 18 (WebCore::V8Blob::constructorCallbackCustom): 19 * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: 20 (WebCore::toCanvasStyle): 21 (WebCore::V8CanvasRenderingContext2D::strokeStyleAccessorSetter): 22 * bindings/v8/custom/V8ClipboardCustom.cpp: 23 (WebCore::V8Clipboard::setDragImageCallback): 24 * bindings/v8/custom/V8CryptoCustom.cpp: 25 (WebCore::V8Crypto::getRandomValuesCallback): 26 * bindings/v8/custom/V8DOMFormDataCustom.cpp: 27 (WebCore::V8DOMFormData::constructorCallbackCustom): 28 (WebCore::V8DOMFormData::appendCallback): 29 * bindings/v8/custom/V8DataViewCustom.cpp: 30 (WebCore::V8DataView::constructorCallbackCustom): 31 * bindings/v8/custom/V8DocumentCustom.cpp: 32 (WebCore::V8Document::evaluateCallback): 33 * bindings/v8/custom/V8HTMLMediaElementCustom.cpp: 34 (WebCore::V8HTMLMediaElement::controllerAccessorSetter): 35 * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: 36 (WebCore::V8HTMLOptionsCollection::addCallback): 37 * bindings/v8/custom/V8HTMLSelectElementCustom.cpp: 38 (WebCore::removeElement): 39 1 40 2013-02-03 Mike West <mkwst@chromium.org> 2 41 -
trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.h
r139601 r141718 140 140 141 141 // See whether the first argument is a ArrayBuffer. 142 if (V8ArrayBuffer::HasInstance(args[0] ))142 if (V8ArrayBuffer::HasInstance(args[0], args.GetIsolate())) 143 143 return constructWebGLArrayWithArrayBufferArgument<ArrayClass, ElementType>(args, type, arrayType, true); 144 144 145 145 // See whether the first argument is the same type as impl. In that case, 146 146 // we can simply memcpy data from source to impl. 147 if (JavaScriptWrapperArrayType::HasInstance(args[0] )) {147 if (JavaScriptWrapperArrayType::HasInstance(args[0], args.GetIsolate())) { 148 148 ArrayClass* source = JavaScriptWrapperArrayType::toNative(args[0]->ToObject()); 149 149 uint32_t length = source->length(); … … 239 239 CPlusPlusArrayType* impl = JavaScriptWrapperArrayType::toNative(args.Holder()); 240 240 241 if (JavaScriptWrapperArrayType::HasInstance(args[0] )) {241 if (JavaScriptWrapperArrayType::HasInstance(args[0], args.GetIsolate())) { 242 242 // void set(in WebGL<T>Array array, [Optional] in unsigned long offset); 243 243 CPlusPlusArrayType* src = JavaScriptWrapperArrayType::toNative(args[0]->ToObject()); -
trunk/Source/WebCore/bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp
r138665 r141718 43 43 44 44 AudioBuffer* buffer = 0; 45 if (V8AudioBuffer::HasInstance(value )) {45 if (V8AudioBuffer::HasInstance(value, info.GetIsolate())) { 46 46 buffer = V8AudioBuffer::toNative(value->ToObject()); 47 47 if (buffer && !imp->setBuffer(buffer)) { -
trunk/Source/WebCore/bindings/v8/custom/V8BlobCustom.cpp
r135847 r141718 98 98 ASSERT(!item.IsEmpty()); 99 99 #if ENABLE(BLOB) 100 if (V8ArrayBuffer::HasInstance(item )) {100 if (V8ArrayBuffer::HasInstance(item, args.GetIsolate())) { 101 101 ArrayBuffer* arrayBuffer = V8ArrayBuffer::toNative(v8::Handle<v8::Object>::Cast(item)); 102 102 ASSERT(arrayBuffer); 103 103 blobBuilder.append(context, arrayBuffer); 104 } else if (V8ArrayBufferView::HasInstance(item )) {104 } else if (V8ArrayBufferView::HasInstance(item, args.GetIsolate())) { 105 105 ArrayBufferView* arrayBufferView = V8ArrayBufferView::toNative(v8::Handle<v8::Object>::Cast(item)); 106 106 ASSERT(arrayBufferView); … … 108 108 } else 109 109 #endif 110 if (V8Blob::HasInstance(item )) {110 if (V8Blob::HasInstance(item, args.GetIsolate())) { 111 111 Blob* blob = V8Blob::toNative(v8::Handle<v8::Object>::Cast(item)); 112 112 ASSERT(blob); -
trunk/Source/WebCore/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp
r127946 r141718 60 60 } 61 61 62 static PassRefPtr<CanvasStyle> toCanvasStyle(v8::Handle<v8::Value> value )62 static PassRefPtr<CanvasStyle> toCanvasStyle(v8::Handle<v8::Value> value, v8::Isolate* isolate) 63 63 { 64 if (V8CanvasGradient::HasInstance(value ))64 if (V8CanvasGradient::HasInstance(value, isolate)) 65 65 return CanvasStyle::createFromGradient(V8CanvasGradient::toNative(v8::Handle<v8::Object>::Cast(value))); 66 66 67 if (V8CanvasPattern::HasInstance(value ))67 if (V8CanvasPattern::HasInstance(value, isolate)) 68 68 return CanvasStyle::createFromPattern(V8CanvasPattern::toNative(v8::Handle<v8::Object>::Cast(value))); 69 69 … … 83 83 impl->setStrokeColor(toWebCoreString(value)); 84 84 else 85 impl->setStrokeStyle(toCanvasStyle(value ));85 impl->setStrokeStyle(toCanvasStyle(value, info.GetIsolate())); 86 86 } 87 87 … … 98 98 impl->setFillColor(toWebCoreString(value)); 99 99 else 100 impl->setFillStyle(toCanvasStyle(value ));100 impl->setFillStyle(toCanvasStyle(value, info.GetIsolate())); 101 101 } 102 102 -
trunk/Source/WebCore/bindings/v8/custom/V8ClipboardCustom.cpp
r138665 r141718 92 92 93 93 Node* node = 0; 94 if (V8Node::HasInstance(args[0] ))94 if (V8Node::HasInstance(args[0], args.GetIsolate())) 95 95 node = V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])); 96 96 -
trunk/Source/WebCore/bindings/v8/custom/V8CryptoCustom.cpp
r138298 r141718 42 42 43 43 v8::Handle<v8::Value> buffer = args[0]; 44 if (!V8ArrayBufferView::HasInstance(buffer ))44 if (!V8ArrayBufferView::HasInstance(buffer, args.GetIsolate())) 45 45 return throwTypeError("First argument is not an ArrayBufferView", args.GetIsolate()); 46 46 -
trunk/Source/WebCore/bindings/v8/custom/V8DOMFormDataCustom.cpp
r139601 r141718 43 43 { 44 44 HTMLFormElement* form = 0; 45 if (args.Length() > 0 && V8HTMLFormElement::HasInstance(args[0] ))45 if (args.Length() > 0 && V8HTMLFormElement::HasInstance(args[0], args.GetIsolate())) 46 46 form = V8HTMLFormElement::toNative(args[0]->ToObject()); 47 47 RefPtr<DOMFormData> domFormData = DOMFormData::create(form); … … 62 62 63 63 v8::Handle<v8::Value> arg = args[1]; 64 if (V8Blob::HasInstance(arg )) {64 if (V8Blob::HasInstance(arg, args.GetIsolate())) { 65 65 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg); 66 66 Blob* blob = V8Blob::toNative(object); -
trunk/Source/WebCore/bindings/v8/custom/V8DataViewCustom.cpp
r139601 r141718 43 43 return wrapper; 44 44 } 45 if (args[0]->IsNull() || !V8ArrayBuffer::HasInstance(args[0] ))45 if (args[0]->IsNull() || !V8ArrayBuffer::HasInstance(args[0], args.GetIsolate())) 46 46 return throwTypeError(0, args.GetIsolate()); 47 47 return constructWebGLArrayWithArrayBufferArgument<DataView, char>(args, &info, v8::kExternalByteArray, false); -
trunk/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
r138677 r141718 71 71 String expression = toWebCoreString(args[0]); 72 72 RefPtr<Node> contextNode; 73 if (V8Node::HasInstance(args[1] ))73 if (V8Node::HasInstance(args[1], args.GetIsolate())) 74 74 contextNode = V8Node::toNative(v8::Handle<v8::Object>::Cast(args[1])); 75 75 … … 80 80 int type = toInt32(args[3]); 81 81 RefPtr<XPathResult> inResult; 82 if (V8XPathResult::HasInstance(args[4] ))82 if (V8XPathResult::HasInstance(args[4], args.GetIsolate())) 83 83 inResult = V8XPathResult::toNative(v8::Handle<v8::Object>::Cast(args[4])); 84 84 -
trunk/Source/WebCore/bindings/v8/custom/V8HTMLMediaElementCustom.cpp
r138665 r141718 38 38 HTMLMediaElement* imp = V8HTMLMediaElement::toNative(info.Holder()); 39 39 MediaController* controller = 0; 40 if (V8MediaController::HasInstance(value ))40 if (V8MediaController::HasInstance(value, info.GetIsolate())) 41 41 controller = V8MediaController::toNative(value->ToObject()); 42 42 -
trunk/Source/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
r138677 r141718 91 91 v8::Handle<v8::Value> V8HTMLOptionsCollection::addCallback(const v8::Arguments& args) 92 92 { 93 if (!V8HTMLOptionElement::HasInstance(args[0] ))93 if (!V8HTMLOptionElement::HasInstance(args[0], args.GetIsolate())) 94 94 return setDOMException(TYPE_MISMATCH_ERR, args.GetIsolate()); 95 95 HTMLOptionsCollection* imp = V8HTMLOptionsCollection::toNative(args.Holder()); -
trunk/Source/WebCore/bindings/v8/custom/V8HTMLSelectElementCustom.cpp
r138665 r141718 70 70 v8::Handle<v8::Value> removeElement(HTMLSelectElement* imp, const v8::Arguments& args) 71 71 { 72 if (V8HTMLOptionElement::HasInstance(args[0] )) {72 if (V8HTMLOptionElement::HasInstance(args[0], args.GetIsolate())) { 73 73 HTMLOptionElement* element = V8HTMLOptionElement::toNative(v8::Handle<v8::Object>::Cast(args[0])); 74 74 imp->remove(element->index());
Note: See TracChangeset
for help on using the changeset viewer.