Commit a5db36a6 authored by haraken@chromium.org's avatar haraken@chromium.org

[V8] Pass an Isolate to associateObjectWithWrapper()

https://bugs.webkit.org/show_bug.cgi?id=106773

Reviewed by Adam Barth.

In preparation for making an Isolate parameter mandatory
in associateObjectWithWrapper(), this patch passes an
Isolate to associateObjectWithWrapper().

No tests. No change in behavior.

* bindings/v8/custom/V8ArrayBufferCustom.cpp:
(WebCore::V8ArrayBuffer::constructorCallbackCustom):
* bindings/v8/custom/V8ArrayBufferViewCustom.h:
(WebCore::wrapArrayBufferView):
(WebCore::constructWebGLArray):
* bindings/v8/custom/V8AudioContextCustom.cpp:
(WebCore::V8AudioContext::constructorCallbackCustom):
* bindings/v8/custom/V8DOMFormDataCustom.cpp:
(WebCore::V8DOMFormData::constructorCallbackCustom):
* bindings/v8/custom/V8DataViewCustom.cpp:
(WebCore::V8DataView::constructorCallbackCustom):
* bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
(WebCore::v8HTMLImageElementConstructorCallback):
* bindings/v8/custom/V8IntentCustom.cpp:
(WebCore::V8Intent::constructorCallbackCustom):
* bindings/v8/custom/V8MessageChannelCustom.cpp:
(WebCore::V8MessageChannel::constructorCallbackCustom):
* bindings/v8/custom/V8MutationObserverCustom.cpp:
(WebCore::V8MutationObserver::constructorCallbackCustom):
* bindings/v8/custom/V8WebKitPointCustom.cpp:
(WebCore::V8WebKitPoint::constructorCallbackCustom):
* bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
(WebCore::V8XMLHttpRequest::constructorCallbackCustom):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139601 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2fcbc516
2013-01-14 Kentaro Hara <haraken@chromium.org>
[V8] Pass an Isolate to associateObjectWithWrapper()
https://bugs.webkit.org/show_bug.cgi?id=106773
Reviewed by Adam Barth.
In preparation for making an Isolate parameter mandatory
in associateObjectWithWrapper(), this patch passes an
Isolate to associateObjectWithWrapper().
No tests. No change in behavior.
* bindings/v8/custom/V8ArrayBufferCustom.cpp:
(WebCore::V8ArrayBuffer::constructorCallbackCustom):
* bindings/v8/custom/V8ArrayBufferViewCustom.h:
(WebCore::wrapArrayBufferView):
(WebCore::constructWebGLArray):
* bindings/v8/custom/V8AudioContextCustom.cpp:
(WebCore::V8AudioContext::constructorCallbackCustom):
* bindings/v8/custom/V8DOMFormDataCustom.cpp:
(WebCore::V8DOMFormData::constructorCallbackCustom):
* bindings/v8/custom/V8DataViewCustom.cpp:
(WebCore::V8DataView::constructorCallbackCustom):
* bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
(WebCore::v8HTMLImageElementConstructorCallback):
* bindings/v8/custom/V8IntentCustom.cpp:
(WebCore::V8Intent::constructorCallbackCustom):
* bindings/v8/custom/V8MessageChannelCustom.cpp:
(WebCore::V8MessageChannel::constructorCallbackCustom):
* bindings/v8/custom/V8MutationObserverCustom.cpp:
(WebCore::V8MutationObserver::constructorCallbackCustom):
* bindings/v8/custom/V8WebKitPointCustom.cpp:
(WebCore::V8WebKitPoint::constructorCallbackCustom):
* bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
(WebCore::V8XMLHttpRequest::constructorCallbackCustom):
2013-01-14 Kentaro Hara <haraken@chromium.org>
[V8] Call Isolate::GetCurrent() in a callback from WebCore
......@@ -76,7 +76,7 @@ v8::Handle<v8::Value> V8ArrayBuffer::constructorCallbackCustom(const v8::Argumen
v8::V8::AdjustAmountOfExternalAllocatedMemory(buffer->byteLength());
// Transform the holder into a wrapper object for the array.
v8::Handle<v8::Object> wrapper = args.Holder();
V8DOMWrapper::associateObjectWithWrapper(buffer.release(), &info, wrapper);
V8DOMWrapper::associateObjectWithWrapper(buffer.release(), &info, wrapper, args.GetIsolate());
return wrapper;
}
......
......@@ -55,7 +55,7 @@ v8::Handle<v8::Value> wrapArrayBufferView(const v8::Arguments& args, WrapperType
if (hasIndexer)
args.Holder()->SetIndexedPropertiesToExternalArrayData(array.get()->baseAddress(), arrayType, array.get()->length());
v8::Handle<v8::Object> wrapper = args.Holder();
v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::associateObjectWithWrapper(array.release(), type, wrapper);
v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::associateObjectWithWrapper(array.release(), type, wrapper, args.GetIsolate());
wrapperHandle.MarkIndependent();
return wrapper;
}
......@@ -225,7 +225,7 @@ v8::Handle<v8::Value> constructWebGLArray(const v8::Arguments& args, WrapperType
}
v8::Handle<v8::Object> wrapper = args.Holder();
v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::associateObjectWithWrapper(array.release(), type, wrapper);
v8::Persistent<v8::Object> wrapperHandle = V8DOMWrapper::associateObjectWithWrapper(array.release(), type, wrapper, args.GetIsolate());
wrapperHandle.MarkIndependent();
return wrapper;
}
......
......@@ -73,7 +73,7 @@ v8::Handle<v8::Value> V8AudioContext::constructorCallbackCustom(const v8::Argume
// Transform the holder into a wrapper object for the audio context.
v8::Handle<v8::Object> wrapper = args.Holder();
V8DOMWrapper::associateObjectWithWrapper(audioContext.release(), &info, wrapper);
V8DOMWrapper::associateObjectWithWrapper(audioContext.release(), &info, wrapper, args.GetIsolate());
return wrapper;
}
......
......@@ -47,7 +47,7 @@ v8::Handle<v8::Value> V8DOMFormData::constructorCallbackCustom(const v8::Argumen
RefPtr<DOMFormData> domFormData = DOMFormData::create(form);
v8::Handle<v8::Object> wrapper = args.Holder();
V8DOMWrapper::associateObjectWithWrapper(domFormData.release(), &info, wrapper);
V8DOMWrapper::associateObjectWithWrapper(domFormData.release(), &info, wrapper, args.GetIsolate());
return wrapper;
}
......
......@@ -39,7 +39,7 @@ v8::Handle<v8::Value> V8DataView::constructorCallbackCustom(const v8::Arguments&
// 'new DataView()' and the call used to construct the cached DataView object.
RefPtr<DataView> dataView = DataView::create(0);
v8::Handle<v8::Object> wrapper = args.Holder();
V8DOMWrapper::associateObjectWithWrapper(dataView.release(), &info, wrapper);
V8DOMWrapper::associateObjectWithWrapper(dataView.release(), &info, wrapper, args.GetIsolate());
return wrapper;
}
if (args[0]->IsNull() || !V8ArrayBuffer::HasInstance(args[0]))
......
......@@ -77,7 +77,7 @@ static v8::Handle<v8::Value> v8HTMLImageElementConstructorCallback(const v8::Arg
RefPtr<HTMLImageElement> image = HTMLImageElement::createForJSConstructor(document, optionalWidth, optionalHeight);
v8::Handle<v8::Object> wrapper = args.Holder();
V8DOMWrapper::associateObjectWithWrapper(image.release(), &V8HTMLImageElementConstructor::info, wrapper);
V8DOMWrapper::associateObjectWithWrapper(image.release(), &V8HTMLImageElementConstructor::info, wrapper, args.GetIsolate());
return wrapper;
}
......
......@@ -55,7 +55,7 @@ v8::Handle<v8::Value> V8Intent::constructorCallbackCustom(const v8::Arguments& a
return setDOMException(ec, args.GetIsolate());
v8::Handle<v8::Object> wrapper = args.Holder();
V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper);
V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate());
return wrapper;
}
......@@ -78,7 +78,7 @@ v8::Handle<v8::Value> V8Intent::constructorCallbackCustom(const v8::Arguments& a
return setDOMException(ec, args.GetIsolate());
v8::Handle<v8::Object> wrapper = args.Holder();
V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper);
V8DOMWrapper::associateObjectWithWrapper(impl.release(), &info, wrapper, args.GetIsolate());
return wrapper;
}
......
......@@ -57,7 +57,7 @@ v8::Handle<v8::Value> V8MessageChannel::constructorCallbackCustom(const v8::Argu
V8DOMWrapper::setNamedHiddenReference(wrapper, "port1", toV8(obj->port1(), args.Holder(), args.GetIsolate()));
V8DOMWrapper::setNamedHiddenReference(wrapper, "port2", toV8(obj->port2(), args.Holder(), args.GetIsolate()));
V8DOMWrapper::associateObjectWithWrapper(obj.release(), &info, wrapper);
V8DOMWrapper::associateObjectWithWrapper(obj.release(), &info, wrapper, args.GetIsolate());
return wrapper;
}
......
......@@ -56,7 +56,7 @@ v8::Handle<v8::Value> V8MutationObserver::constructorCallbackCustom(const v8::Ar
RefPtr<MutationCallback> callback = V8MutationCallback::create(arg, context, wrapper);
RefPtr<MutationObserver> observer = MutationObserver::create(callback.release());
V8DOMWrapper::associateObjectWithWrapper(observer.release(), &info, wrapper);
V8DOMWrapper::associateObjectWithWrapper(observer.release(), &info, wrapper, args.GetIsolate());
return wrapper;
}
......
......@@ -57,7 +57,7 @@ v8::Handle<v8::Value> V8WebKitPoint::constructorCallbackCustom(const v8::Argumen
}
RefPtr<WebKitPoint> point = WebKitPoint::create(x, y);
v8::Handle<v8::Object> wrapper = args.Holder();
V8DOMWrapper::associateObjectWithWrapper(point.release(), &info, wrapper);
V8DOMWrapper::associateObjectWithWrapper(point.release(), &info, wrapper, args.GetIsolate());
return wrapper;
}
......
......@@ -61,7 +61,7 @@ v8::Handle<v8::Value> V8XMLHttpRequest::constructorCallbackCustom(const v8::Argu
RefPtr<XMLHttpRequest> xmlHttpRequest = XMLHttpRequest::create(context, securityOrigin);
v8::Handle<v8::Object> wrapper = args.Holder();
V8DOMWrapper::associateObjectWithWrapper(xmlHttpRequest.release(), &info, wrapper);
V8DOMWrapper::associateObjectWithWrapper(xmlHttpRequest.release(), &info, wrapper, args.GetIsolate());
return wrapper;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment