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

Unified Diff: test/cctest/test-mark-compact.cc

Issue 2866008: [Isolates] Move contents of Top into Isolate.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: ensure we're synced Created 10 years, 6 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 | « test/cctest/test-log-stack-tracer.cc ('k') | test/cctest/test-regexp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-mark-compact.cc
===================================================================
--- test/cctest/test-mark-compact.cc (revision 4906)
+++ test/cctest/test-mark-compact.cc (working copy)
@@ -31,7 +31,6 @@
#include "global-handles.h"
#include "snapshot.h"
-#include "top.h"
#include "cctest.h"
using namespace v8::internal;
@@ -173,35 +172,40 @@
SharedFunctionInfo* function_share =
SharedFunctionInfo::cast(HEAP->AllocateSharedFunctionInfo(func_name));
JSFunction* function =
- JSFunction::cast(HEAP->AllocateFunction(*Top::function_map(),
+ JSFunction::cast(HEAP->AllocateFunction(*Isolate::Current()->function_map(),
function_share,
HEAP->undefined_value()));
Map* initial_map =
Map::cast(HEAP->AllocateMap(JS_OBJECT_TYPE, JSObject::kHeaderSize));
function->set_initial_map(initial_map);
- Top::context()->global()->SetProperty(func_name, function, NONE);
+ Isolate::Current()->context()->global()->SetProperty(func_name,
+ function,
+ NONE);
JSObject* obj = JSObject::cast(HEAP->AllocateJSObject(function));
CHECK(HEAP->CollectGarbage(0, OLD_POINTER_SPACE));
func_name = String::cast(HEAP->LookupAsciiSymbol("theFunction"));
- CHECK(Top::context()->global()->HasLocalProperty(func_name));
- Object* func_value = Top::context()->global()->GetProperty(func_name);
+ CHECK(Isolate::Current()->context()->global()->HasLocalProperty(func_name));
+ Object* func_value =
+ Isolate::Current()->context()->global()->GetProperty(func_name);
CHECK(func_value->IsJSFunction());
function = JSFunction::cast(func_value);
obj = JSObject::cast(HEAP->AllocateJSObject(function));
String* obj_name = String::cast(HEAP->LookupAsciiSymbol("theObject"));
- Top::context()->global()->SetProperty(obj_name, obj, NONE);
+ Isolate::Current()->context()->global()->SetProperty(obj_name, obj, NONE);
String* prop_name = String::cast(HEAP->LookupAsciiSymbol("theSlot"));
obj->SetProperty(prop_name, Smi::FromInt(23), NONE);
CHECK(HEAP->CollectGarbage(0, OLD_POINTER_SPACE));
obj_name = String::cast(HEAP->LookupAsciiSymbol("theObject"));
- CHECK(Top::context()->global()->HasLocalProperty(obj_name));
- CHECK(Top::context()->global()->GetProperty(obj_name)->IsJSObject());
- obj = JSObject::cast(Top::context()->global()->GetProperty(obj_name));
+ CHECK(Isolate::Current()->context()->global()->HasLocalProperty(obj_name));
+ CHECK(Isolate::Current()->context()->global()->GetProperty(obj_name)->
+ IsJSObject());
+ obj = JSObject::cast(Isolate::Current()->context()->global()->
+ GetProperty(obj_name));
prop_name = String::cast(HEAP->LookupAsciiSymbol("theSlot"));
CHECK(obj->GetProperty(prop_name) == Smi::FromInt(23));
}
« no previous file with comments | « test/cctest/test-log-stack-tracer.cc ('k') | test/cctest/test-regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698