Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/core/v8/ScriptPromiseTest.cpp |
| diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseTest.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseTest.cpp |
| index 7146ae52bb7f5875f4343a7e35da23b3a4499a0c..a4d9df33f9ecbfe283a9b178c3d68cf5cf7a34b1 100644 |
| --- a/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseTest.cpp |
| +++ b/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseTest.cpp |
| @@ -46,8 +46,6 @@ namespace { |
| typedef ScriptPromise::InternalResolver Resolver; |
| -void callback(const v8::FunctionCallbackInfo<v8::Value>& info) { } |
| - |
| class Function : public ScriptFunction { |
| public: |
| static v8::Local<v8::Function> createFunction(ScriptState* scriptState, ScriptValue* output) |
| @@ -83,9 +81,6 @@ public: |
| ~TryCatchScope() |
| { |
| - // FIXME: We put this statement here to clear an exception from the isolate. |
| - createClosure(callback, v8::Undefined(m_isolate), m_isolate); |
| - |
| // Execute all pending microtasks |
| v8::MicrotasksScope::PerformCheckpoint(m_isolate); |
| } |
| @@ -116,6 +111,11 @@ TEST(ScriptPromiseTest, constructFromNonPromise) |
| ScriptPromise promise(scope.getScriptState(), v8::Undefined(scope.isolate())); |
| ASSERT_TRUE(tryCatchScope.hasCaught()); |
| ASSERT_TRUE(promise.isEmpty()); |
| + |
| + // TODO(yukishiino): We put this statement here to clear an exception from |
| + // the isolate. Otherwise, the leak detector complains. Really mysterious |
| + // hack. |
| + v8::Function::New(scope.context(), nullptr); |
|
haraken
2016/07/21 13:28:28
I'd add this to the destructor of V8TestingScope.
Yuki
2016/07/22 09:10:31
Done.
|
| } |
| TEST(ScriptPromiseTest, thenResolve) |