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

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

Issue 265293004: Create fewer local v8::TryCatch objects in generated bindings code (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: added comment Created 6 years, 7 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
Index: Source/bindings/tests/results/V8TestInterfaceGarbageCollected.cpp
diff --git a/Source/bindings/tests/results/V8TestInterfaceGarbageCollected.cpp b/Source/bindings/tests/results/V8TestInterfaceGarbageCollected.cpp
index 9eff73f451c9ed291bef39a71a32244c8b597dda..3be8dbb88c6b7c67ef8bcdc99b6456b25a0474bf 100644
--- a/Source/bindings/tests/results/V8TestInterfaceGarbageCollected.cpp
+++ b/Source/bindings/tests/results/V8TestInterfaceGarbageCollected.cpp
@@ -79,7 +79,11 @@ static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
return;
}
TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toNative(info.Holder());
- TONATIVE_VOID(TestInterfaceGarbageCollected*, arg, V8TestInterfaceGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
+ TestInterfaceGarbageCollected* arg;
+ {
+ v8::TryCatch block;
+ TONATIVE_VOID_INTERNAL(arg, V8TestInterfaceGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
+ }
impl->func(arg);
}
@@ -97,7 +101,10 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
throwMinimumArityTypeErrorForConstructor("TestInterfaceGarbageCollected", 1, info.Length(), info.GetIsolate());
return;
}
- TOSTRING_VOID(V8StringResource<>, str, info[0]);
+ V8StringResource<> str;
+ {
+ TOSTRING_VOID_INTERNAL(str, info[0]);
+ }
RawPtr<TestInterfaceGarbageCollected> impl = TestInterfaceGarbageCollected::create(str);
v8::Handle<v8::Object> wrapper = info.Holder();

Powered by Google App Engine
This is Rietveld 408576698