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

Side by Side Diff: test/cctest/test-api.cc

Issue 10358010: Fix register clobbering in LoadIC for interceptors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 16194 matching lines...) Expand 10 before | Expand all | Expand 10 after
16205 CHECK(result5->Equals( 16205 CHECK(result5->Equals(
16206 object_with_hidden->GetPrototype()->ToObject()->GetPrototype())); 16206 object_with_hidden->GetPrototype()->ToObject()->GetPrototype()));
16207 16207
16208 Local<Value> result6 = CompileRun("Object.getPrototypeOf(phidden)"); 16208 Local<Value> result6 = CompileRun("Object.getPrototypeOf(phidden)");
16209 CHECK(result6->Equals(Undefined())); 16209 CHECK(result6->Equals(Undefined()));
16210 16210
16211 context.Dispose(); 16211 context.Dispose();
16212 } 16212 }
16213 16213
16214 16214
16215 THREADED_TEST(Regress125988) {
16216 v8::HandleScope scope;
16217 Handle<FunctionTemplate> intercept = FunctionTemplate::New();
16218 AddInterceptor(intercept, EmptyInterceptorGetter, EmptyInterceptorSetter);
16219 LocalContext env;
16220 env->Global()->Set(v8_str("Intercept"), intercept->GetFunction());
16221 CompileRun("var a = new Object();"
16222 "var b = new Intercept();"
16223 "var c = new Object();"
16224 "c.__proto__ = b;"
16225 "b.__proto__ = a;"
16226 "a.x = 23;"
16227 "for (var i = 0; i < 3; i++) c.x;");
16228 ExpectBoolean("c.hasOwnProperty('x')", false);
16229 ExpectInt32("c.x", 23);
16230 CompileRun("a.y = 42;"
16231 "for (var i = 0; i < 3; i++) c.x;");
16232 ExpectBoolean("c.hasOwnProperty('x')", false);
16233 ExpectInt32("c.x", 23);
16234 ExpectBoolean("c.hasOwnProperty('y')", false);
16235 ExpectInt32("c.y", 42);
16236 }
16237
16238
16215 static void TestReceiver(Local<Value> expected_result, 16239 static void TestReceiver(Local<Value> expected_result,
16216 Local<Value> expected_receiver, 16240 Local<Value> expected_receiver,
16217 const char* code) { 16241 const char* code) {
16218 Local<Value> result = CompileRun(code); 16242 Local<Value> result = CompileRun(code);
16219 CHECK(result->IsObject()); 16243 CHECK(result->IsObject());
16220 CHECK(expected_receiver->Equals(result->ToObject()->Get(1))); 16244 CHECK(expected_receiver->Equals(result->ToObject()->Get(1)));
16221 CHECK(expected_result->Equals(result->ToObject()->Get(0))); 16245 CHECK(expected_result->Equals(result->ToObject()->Get(0)));
16222 } 16246 }
16223 16247
16224 16248
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
16562 v8::V8::SetFatalErrorHandler(CountingErrorCallback); 16586 v8::V8::SetFatalErrorHandler(CountingErrorCallback);
16563 v8::Utils::ReportApiFailure("StringEmpty()", "Kill V8"); 16587 v8::Utils::ReportApiFailure("StringEmpty()", "Kill V8");
16564 i::Isolate::Current()->TearDown(); 16588 i::Isolate::Current()->TearDown();
16565 CHECK(!i::Internals::IsInitialized(isolate)); 16589 CHECK(!i::Internals::IsInitialized(isolate));
16566 CHECK_EQ(1, fatal_error_callback_counter); 16590 CHECK_EQ(1, fatal_error_callback_counter);
16567 CHECK(v8::String::Empty().IsEmpty()); 16591 CHECK(v8::String::Empty().IsEmpty());
16568 CHECK_EQ(2, fatal_error_callback_counter); 16592 CHECK_EQ(2, fatal_error_callback_counter);
16569 CHECK(v8::String::Empty(isolate).IsEmpty()); 16593 CHECK(v8::String::Empty(isolate).IsEmpty());
16570 CHECK_EQ(3, fatal_error_callback_counter); 16594 CHECK_EQ(3, fatal_error_callback_counter);
16571 } 16595 }
OLDNEW
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698