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

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

Issue 1242093002: Fix getPrototypeOf for access checked objects (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Return null rather than undefined Created 5 years, 5 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 | « src/runtime/runtime-object.cc ('k') | no next file » | 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 4f38198aaf21c4759dfba3e463940501dd2ed4fb..c09a71484f1a0c2660d694ad5c3bf7d2e45ae0b6 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -18104,20 +18104,20 @@ THREADED_TEST(Regress93759) {
CHECK(result1->Equals(simple_object->GetPrototype()));
Local<Value> result2 = CompileRun("Object.getPrototypeOf(protected)");
- CHECK(result2.IsEmpty());
+ CHECK(result2->IsNull());
Local<Value> result3 = CompileRun("Object.getPrototypeOf(global)");
CHECK(result3->Equals(global_object->GetPrototype()));
Local<Value> result4 = CompileRun("Object.getPrototypeOf(proxy)");
- CHECK(result4.IsEmpty());
+ CHECK(result4->IsNull());
Local<Value> result5 = CompileRun("Object.getPrototypeOf(hidden)");
CHECK(result5->Equals(
object_with_hidden->GetPrototype()->ToObject(isolate)->GetPrototype()));
Local<Value> result6 = CompileRun("Object.getPrototypeOf(phidden)");
- CHECK(result6.IsEmpty());
+ CHECK(result6->IsNull());
}
@@ -21285,14 +21285,10 @@ TEST(GetPrototypeAccessControl) {
env->Global()->Set(v8_str("prohibited"), obj_template->NewInstance());
- {
- v8::TryCatch try_catch(isolate);
- CompileRun(
- "function f() { %_GetPrototype(prohibited); }"
- "%OptimizeFunctionOnNextCall(f);"
- "f();");
- CHECK(try_catch.HasCaught());
- }
+ CHECK(CompileRun(
+ "function f() { return %_GetPrototype(prohibited); }"
+ "%OptimizeFunctionOnNextCall(f);"
+ "f();")->IsNull());
}
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698