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

Unified Diff: Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.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/V8TestInterfaceWillBeGarbageCollected.cpp
diff --git a/Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp b/Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp
index 59322aefa0b2f13d40ead64458694f37bb48b6aa..9cb2866eddbd1e1225064269a9fc77883c4c14ea 100644
--- a/Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp
+++ b/Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp
@@ -79,7 +79,11 @@ static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
return;
}
TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageCollected::toNative(info.Holder());
- TONATIVE_VOID(TestInterfaceWillBeGarbageCollected*, arg, V8TestInterfaceWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
+ TestInterfaceWillBeGarbageCollected* arg;
+ {
+ v8::TryCatch block;
+ TONATIVE_VOID_INTERNAL(arg, V8TestInterfaceWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
+ }
impl->func(arg);
}
@@ -97,7 +101,10 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
throwMinimumArityTypeErrorForConstructor("TestInterfaceWillBeGarbageCollected", 1, info.Length(), info.GetIsolate());
return;
}
- TOSTRING_VOID(V8StringResource<>, str, info[0]);
+ V8StringResource<> str;
+ {
+ TOSTRING_VOID_INTERNAL(str, info[0]);
+ }
RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterfaceWillBeGarbageCollected::create(str);
v8::Handle<v8::Object> wrapper = info.Holder();
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfaceNode.cpp ('k') | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698