Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Unified Diff: Source/bindings/tests/results/V8TestInterfaceNamedConstructor2.cpp

Issue 229373006: Support optional, non-defaulted constructor arguments. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Formatting Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8TestInterfaceNamedConstructor2.cpp
diff --git a/Source/bindings/tests/results/V8TestInterfaceNamedConstructor2.cpp b/Source/bindings/tests/results/V8TestInterfaceNamedConstructor2.cpp
index 3b943d4487e55a84800d65535afba37f0856d1c6..7646f20b0cdf56b37a25797e0ec45df09b1c5e30 100644
--- a/Source/bindings/tests/results/V8TestInterfaceNamedConstructor2.cpp
+++ b/Source/bindings/tests/results/V8TestInterfaceNamedConstructor2.cpp
@@ -49,22 +49,23 @@ const WrapperTypeInfo V8TestInterfaceNamedConstructor2Constructor::wrapperTypeIn
static void V8TestInterfaceNamedConstructor2ConstructorCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
+ v8::Isolate* isolate = info.GetIsolate();
if (!info.IsConstructCall()) {
- throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Audio"), info.GetIsolate());
+ throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Audio"), isolate);
return;
}
- if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExistingObject) {
+ if (ConstructorMode::current(isolate) == ConstructorMode::WrapExistingObject) {
v8SetReturnValue(info, info.Holder());
return;
}
- Document* document = currentDOMWindow(info.GetIsolate())->document();
+ Document* document = currentDOMWindow(isolate)->document();
ASSERT(document);
// Make sure the document is added to the DOM Node map. Otherwise, the TestInterfaceNamedConstructor2 instance
// may end up being the only node in the map and get garbage-collected prematurely.
- toV8(document, info.Holder(), info.GetIsolate());
+ toV8(document, info.Holder(), isolate);
if (UNLIKELY(info.Length() < 1)) {
throwArityTypeErrorForConstructor("TestInterfaceNamedConstructor2", 1, info.Length(), info.GetIsolate());
@@ -74,7 +75,7 @@ static void V8TestInterfaceNamedConstructor2ConstructorCallback(const v8::Functi
RefPtr<TestInterfaceNamedConstructor2> impl = TestInterfaceNamedConstructor2::createForJSConstructor(*document, stringArg);
v8::Handle<v8::Object> wrapper = info.Holder();
- V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor2>(impl.release(), &V8TestInterfaceNamedConstructor2Constructor::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration::Independent);
+ V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor2>(impl.release(), &V8TestInterfaceNamedConstructor2Constructor::wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
v8SetReturnValue(info, wrapper);
}
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698