Commit 6e8f53e3 authored by yukishiino's avatar yukishiino Committed by Commit bot

Removes abuse of createClosure() from ScriptPromiseTest.

createClosure() is abused in ScriptPromise{,Resolver}Test,
so, simply removes it.

BUG=626266

Review-Url: https://codereview.chromium.org/2144413004
Cr-Commit-Position: refs/heads/master@{#407109}
parent c75de112
......@@ -18,8 +18,6 @@ namespace blink {
namespace {
void callback(const v8::FunctionCallbackInfo<v8::Value>& info) { }
class Function : public ScriptFunction {
public:
static v8::Local<v8::Function> createFunction(ScriptState* scriptState, String* value)
......@@ -54,11 +52,6 @@ public:
~ScriptPromiseResolverTest() override
{
ScriptState::Scope scope(getScriptState());
// FIXME: We put this statement here to clear an exception from the
// isolate.
createClosure(callback, v8::Undefined(isolate()), isolate());
// Execute all pending microtasks
v8::MicrotasksScope::PerformCheckpoint(isolate());
}
......
......@@ -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);
}
......
......@@ -82,6 +82,11 @@ Document& V8TestingScope::document()
V8TestingScope::~V8TestingScope()
{
// 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(context(), nullptr);
if (m_holder->document().frame())
getScriptState()->disposePerContextData();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment