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

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

Issue 12212011: Make __proto__ a foreign callback on Object.prototype. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added regression test for issue 2441. Created 7 years, 10 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/property.h ('k') | test/mjsunit/builtins.js » ('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 341459e2de3c4e732e3ddf38b3b1527f4cce6d50..f00752060a79bde210401cda0f457981e20ca269 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -1849,8 +1849,8 @@ THREADED_TEST(PropertyHandlerInPrototype) {
Local<v8::Object> top = templ->GetFunction()->NewInstance();
Local<v8::Object> middle = templ->GetFunction()->NewInstance();
- bottom->Set(v8_str("__proto__"), middle);
- middle->Set(v8_str("__proto__"), top);
+ bottom->SetPrototype(middle);
+ middle->SetPrototype(top);
env->Global()->Set(v8_str("obj"), bottom);
// Indexed and named get.
@@ -9650,7 +9650,7 @@ THREADED_TEST(InterceptorCallICCacheableNotNeeded) {
call_ic_function4 =
v8_compile("function f(x) { return x - 1; }; f")->Run();
v8::Handle<Value> value = CompileRun(
- "o.__proto__.x = function(x) { return x + 1; };"
+ "Object.getPrototypeOf(o).x = function(x) { return x + 1; };"
"var result = 0;"
"for (var i = 0; i < 1000; i++) {"
" result = o.x(42);"
« no previous file with comments | « src/property.h ('k') | test/mjsunit/builtins.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698