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

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

Issue 12254007: Make the Isolate parameter mandatory for internal HandleScopes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/type-info.cc ('k') | test/cctest/test-cpu-profiler.cc » ('j') | 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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 "for (var i = 0; i < 2048; i++) {" 391 "for (var i = 0; i < 2048; i++) {"
392 " var result = obj.xxx;" 392 " var result = obj.xxx;"
393 " result[0] = last;" 393 " result[0] = last;"
394 " last = result;" 394 " last = result;"
395 "}"))->Run(); 395 "}"))->Run();
396 } 396 }
397 397
398 398
399 static v8::Handle<Value> StackCheck(Local<String> name, 399 static v8::Handle<Value> StackCheck(Local<String> name,
400 const AccessorInfo& info) { 400 const AccessorInfo& info) {
401 i::StackFrameIterator iter; 401 i::StackFrameIterator iter(reinterpret_cast<i::Isolate*>(info.GetIsolate()));
402 for (int i = 0; !iter.done(); i++) { 402 for (int i = 0; !iter.done(); i++) {
403 i::StackFrame* frame = iter.frame(); 403 i::StackFrame* frame = iter.frame();
404 CHECK(i != 0 || (frame->type() == i::StackFrame::EXIT)); 404 CHECK(i != 0 || (frame->type() == i::StackFrame::EXIT));
405 i::Code* code = frame->LookupCode(); 405 i::Code* code = frame->LookupCode();
406 CHECK(code->IsCode()); 406 CHECK(code->IsCode());
407 i::Address pc = frame->pc(); 407 i::Address pc = frame->pc();
408 CHECK(code->contains(pc)); 408 CHECK(code->contains(pc));
409 iter.Advance(); 409 iter.Advance();
410 } 410 }
411 return v8::Undefined(); 411 return v8::Undefined();
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 v8::HandleScope scope; 472 v8::HandleScope scope;
473 LocalContext env; 473 LocalContext env;
474 474
475 v8::Handle<v8::ObjectTemplate> obj = ObjectTemplate::New(); 475 v8::Handle<v8::ObjectTemplate> obj = ObjectTemplate::New();
476 obj->SetNamedPropertyHandler( 476 obj->SetNamedPropertyHandler(
477 JSONStringifyGetter, NULL, NULL, NULL, JSONStringifyEnumerator); 477 JSONStringifyGetter, NULL, NULL, NULL, JSONStringifyEnumerator);
478 env->Global()->Set(v8_str("obj"), obj->NewInstance()); 478 env->Global()->Set(v8_str("obj"), obj->NewInstance());
479 v8::Handle<v8::String> expected = v8_str("{\"regress\":\"crbug-161028\"}"); 479 v8::Handle<v8::String> expected = v8_str("{\"regress\":\"crbug-161028\"}");
480 CHECK(CompileRun("JSON.stringify(obj)")->Equals(expected)); 480 CHECK(CompileRun("JSON.stringify(obj)")->Equals(expected));
481 } 481 }
OLDNEW
« no previous file with comments | « src/type-info.cc ('k') | test/cctest/test-cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698