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

Unified Diff: Source/bindings/core/v8/ScriptStreamerTest.cpp

Issue 1003043002: bindings: Use Maybe APIs in V8ScriptRunner (part 1) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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/core/v8/ScriptStreamerTest.cpp
diff --git a/Source/bindings/core/v8/ScriptStreamerTest.cpp b/Source/bindings/core/v8/ScriptStreamerTest.cpp
index fd597336ca9a47372a9d1955369faad959b4c603..09e4c666c9849cda88a1bd3e916d4740bf7ba006 100644
--- a/Source/bindings/core/v8/ScriptStreamerTest.cpp
+++ b/Source/bindings/core/v8/ScriptStreamerTest.cpp
@@ -163,8 +163,8 @@ TEST_F(ScriptStreamingTest, CompilingStreamedScript)
EXPECT_FALSE(errorOccurred);
EXPECT_TRUE(sourceCode.streamer());
v8::TryCatch tryCatch;
- v8::Handle<v8::Script> script = V8ScriptRunner::compileScript(sourceCode, isolate());
- EXPECT_FALSE(script.IsEmpty());
+ v8::Local<v8::Script> script;
+ EXPECT_TRUE(V8ScriptRunner::compileScript(sourceCode, isolate()).ToLocal(&script));
EXPECT_FALSE(tryCatch.HasCaught());
}
@@ -196,8 +196,8 @@ TEST_F(ScriptStreamingTest, CompilingStreamedScriptWithParseError)
EXPECT_FALSE(errorOccurred);
EXPECT_TRUE(sourceCode.streamer());
v8::TryCatch tryCatch;
- v8::Handle<v8::Script> script = V8ScriptRunner::compileScript(sourceCode, isolate());
- EXPECT_TRUE(script.IsEmpty());
+ v8::Local<v8::Script> script;
+ EXPECT_FALSE(V8ScriptRunner::compileScript(sourceCode, isolate()).ToLocal(&script));
EXPECT_TRUE(tryCatch.HasCaught());
}
@@ -327,8 +327,8 @@ TEST_F(ScriptStreamingTest, ScriptsWithSmallFirstChunk)
EXPECT_FALSE(errorOccurred);
EXPECT_TRUE(sourceCode.streamer());
v8::TryCatch tryCatch;
- v8::Handle<v8::Script> script = V8ScriptRunner::compileScript(sourceCode, isolate());
- EXPECT_FALSE(script.IsEmpty());
+ v8::Local<v8::Script> script;
+ EXPECT_TRUE(V8ScriptRunner::compileScript(sourceCode, isolate()).ToLocal(&script));
EXPECT_FALSE(tryCatch.HasCaught());
}
@@ -355,8 +355,8 @@ TEST_F(ScriptStreamingTest, EncodingChanges)
EXPECT_FALSE(errorOccurred);
EXPECT_TRUE(sourceCode.streamer());
v8::TryCatch tryCatch;
- v8::Handle<v8::Script> script = V8ScriptRunner::compileScript(sourceCode, isolate());
- EXPECT_FALSE(script.IsEmpty());
+ v8::Local<v8::Script> script;
+ EXPECT_TRUE(V8ScriptRunner::compileScript(sourceCode, isolate()).ToLocal(&script));
EXPECT_FALSE(tryCatch.HasCaught());
}
@@ -383,8 +383,8 @@ TEST_F(ScriptStreamingTest, EncodingFromBOM)
EXPECT_FALSE(errorOccurred);
EXPECT_TRUE(sourceCode.streamer());
v8::TryCatch tryCatch;
- v8::Handle<v8::Script> script = V8ScriptRunner::compileScript(sourceCode, isolate());
- EXPECT_FALSE(script.IsEmpty());
+ v8::Local<v8::Script> script;
+ EXPECT_TRUE(V8ScriptRunner::compileScript(sourceCode, isolate()).ToLocal(&script));
EXPECT_FALSE(tryCatch.HasCaught());
}

Powered by Google App Engine
This is Rietveld 408576698