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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp

Issue 2301993002: binding: Introduces ExceptionToPromiseScope. (Closed)
Patch Set: Addressed review comments (rename, empty line). Created 4 years, 3 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: third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp
index e791e9dc5bb0df198849b7d4d903e2d2063aed66..ead3d8711f314bc334f27122d99302ce27f4fe0b 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp
@@ -75,6 +75,7 @@ void readonlyStringAttributeAttributeGetterCallback(const v8::FunctionCallbackIn
static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestException* impl = V8TestException::toImpl(info.Holder());
+
v8SetReturnValueString(info, impl->toString(), info.GetIsolate());
}
@@ -85,17 +86,18 @@ static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestException", info.Holder(), info.GetIsolate());
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ConstructionContext, "TestException");
+
if (UNLIKELY(info.Length() < 1)) {
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
return;
}
+
unsigned argument;
- {
- argument = toUInt16(info.GetIsolate(), info[0], NormalConversion, exceptionState);
- if (exceptionState.hadException())
- return;
- }
+ argument = toUInt16(info.GetIsolate(), info[0], NormalConversion, exceptionState);
+ if (exceptionState.hadException())
+ return;
+
TestException* impl = TestException::create(argument);
v8::Local<v8::Object> wrapper = info.Holder();
wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestException::wrapperTypeInfo, wrapper);

Powered by Google App Engine
This is Rietveld 408576698