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

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

Issue 143333003: Fix issue with context not being saved on x64 introduced in 144543004 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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/x64/stub-cache-x64.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-accessors.cc
diff --git a/test/cctest/test-accessors.cc b/test/cctest/test-accessors.cc
index cbbdc507cc79f4b7646916c9fbcbb954c523e5e8..a3ce5c37ec8f10feb0d62d7b57e7b905d9f6b376 100644
--- a/test/cctest/test-accessors.cc
+++ b/test/cctest/test-accessors.cc
@@ -580,14 +580,27 @@ THREADED_TEST(JSONStringifyNamedInterceptorObject) {
}
+static v8::Local<v8::Context> expected_current_context;
+static v8::Local<v8::Context> expected_calling_context;
+
+
+static void check_contexts(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ApiTestFuzzer::Fuzz();
+ CHECK(expected_current_context == info.GetIsolate()->GetCurrentContext());
+ CHECK(expected_calling_context == info.GetIsolate()->GetCallingContext());
+}
+
+
THREADED_TEST(AccessorPropertyCrossContext) {
LocalContext env;
v8::Isolate* isolate = env->GetIsolate();
v8::HandleScope scope(isolate);
- v8::Handle<v8::Function> fun = v8::Function::New(isolate, handle_property);
+ v8::Handle<v8::Function> fun = v8::Function::New(isolate, check_contexts);
LocalContext switch_context;
switch_context->Global()->Set(v8_str("fun"), fun);
v8::TryCatch try_catch;
+ expected_current_context = env.local();
+ expected_calling_context = switch_context.local();
CompileRun(
"var o = Object.create(null, { n: { get:fun } });"
"for (var i = 0; i < 10; i++) o.n;");
« 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