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

Unified Diff: test/cctest/test-api.cc

Issue 1135343005: Revert of [V8] Added Script::is_opaque flag for embedders (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « test/cctest/compiler/test-linkage.cc ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index a97cd1ffa1d5c9a1f29c3e4780df057b62bb3aeb..9e9e03a937910963966f923e4bad19aa7d30c2ce 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -4039,9 +4039,8 @@
static void check_message_3(v8::Handle<v8::Message> message,
v8::Handle<Value> data) {
CHECK(message->IsSharedCrossOrigin());
- CHECK(message->GetScriptOrigin().Options().IsSharedCrossOrigin());
- CHECK(message->GetScriptOrigin().Options().IsEmbedderDebugScript());
- CHECK(message->GetScriptOrigin().Options().IsOpaque());
+ CHECK(message->GetScriptOrigin().ResourceIsSharedCrossOrigin()->Value());
+ CHECK(message->GetScriptOrigin().ResourceIsEmbedderDebugScript()->Value());
CHECK_EQ(6.75, message->GetScriptOrigin().ResourceName()->NumberValue());
CHECK_EQ(7.40, message->GetScriptOrigin().SourceMapUrl()->NumberValue());
message_received = true;
@@ -4058,7 +4057,7 @@
v8::ScriptOrigin origin = v8::ScriptOrigin(
v8_str("6.75"), v8::Integer::New(isolate, 1),
v8::Integer::New(isolate, 2), v8::True(isolate), Handle<v8::Integer>(),
- v8::True(isolate), v8_str("7.40"), v8::True(isolate));
+ v8::True(isolate), v8_str("7.40"));
v8::Handle<v8::Script> script =
Script::Compile(v8_str("throw 'error'"), &origin);
script->Run();
@@ -4118,11 +4117,11 @@
CHECK(!message_received);
v8::V8::AddMessageListener(check_message_5a);
LocalContext context;
- v8::ScriptOrigin origin1 =
+ v8::ScriptOrigin origin =
v8::ScriptOrigin(v8_str("6.75"), v8::Integer::New(isolate, 1),
v8::Integer::New(isolate, 2), v8::True(isolate));
v8::Handle<v8::Script> script =
- Script::Compile(v8_str("throw 'error'"), &origin1);
+ Script::Compile(v8_str("throw 'error'"), &origin);
script->Run();
CHECK(message_received);
// clear out the message listener
@@ -4130,10 +4129,9 @@
message_received = false;
v8::V8::AddMessageListener(check_message_5b);
- v8::ScriptOrigin origin2 =
- v8::ScriptOrigin(v8_str("6.75"), v8::Integer::New(isolate, 1),
- v8::Integer::New(isolate, 2), v8::False(isolate));
- script = Script::Compile(v8_str("throw 'error'"), &origin2);
+ origin = v8::ScriptOrigin(v8_str("6.75"), v8::Integer::New(isolate, 1),
+ v8::Integer::New(isolate, 2), v8::False(isolate));
+ script = Script::Compile(v8_str("throw 'error'"), &origin);
script->Run();
CHECK(message_received);
// clear out the message listener
@@ -15613,8 +15611,7 @@
v8::Integer::New(env->GetIsolate(), 1),
v8::Integer::New(env->GetIsolate(), 1), v8::True(env->GetIsolate()),
v8::Handle<v8::Integer>(), v8::True(env->GetIsolate()),
- v8::String::NewFromUtf8(env->GetIsolate(), "http://sourceMapUrl"),
- v8::True(env->GetIsolate()));
+ v8::String::NewFromUtf8(env->GetIsolate(), "http://sourceMapUrl"));
v8::Handle<v8::String> script = v8::String::NewFromUtf8(
env->GetIsolate(), "function f() {}\n\nfunction g() {}");
v8::Script::Compile(script, &origin)->Run();
@@ -15627,9 +15624,8 @@
CHECK_EQ(0, strcmp("test",
*v8::String::Utf8Value(script_origin_f.ResourceName())));
CHECK_EQ(1, script_origin_f.ResourceLineOffset()->Int32Value());
- CHECK(script_origin_f.Options().IsSharedCrossOrigin());
- CHECK(script_origin_f.Options().IsEmbedderDebugScript());
- CHECK(script_origin_f.Options().IsOpaque());
+ CHECK(script_origin_f.ResourceIsSharedCrossOrigin()->Value());
+ CHECK(script_origin_f.ResourceIsEmbedderDebugScript()->Value());
printf("is name = %d\n", script_origin_f.SourceMapUrl()->IsUndefined());
CHECK_EQ(0, strcmp("http://sourceMapUrl",
@@ -15639,9 +15635,8 @@
CHECK_EQ(0, strcmp("test",
*v8::String::Utf8Value(script_origin_g.ResourceName())));
CHECK_EQ(1, script_origin_g.ResourceLineOffset()->Int32Value());
- CHECK(script_origin_g.Options().IsSharedCrossOrigin());
- CHECK(script_origin_g.Options().IsEmbedderDebugScript());
- CHECK(script_origin_g.Options().IsOpaque());
+ CHECK(script_origin_g.ResourceIsSharedCrossOrigin()->Value());
+ CHECK(script_origin_g.ResourceIsEmbedderDebugScript()->Value());
CHECK_EQ(0, strcmp("http://sourceMapUrl",
*v8::String::Utf8Value(script_origin_g.SourceMapUrl())));
}
« no previous file with comments | « test/cctest/compiler/test-linkage.cc ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698