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

Unified Diff: src/bootstrapper.cc

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixing wrongly wrapped lines Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast/ast.cc ('k') | src/builtins.cc » ('j') | src/debug/debug.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 19e4221706bfc917ccc1e1e772f201b69386fdba..25553e82e4307c7c62de13de7f607f011fd7108d 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -31,7 +31,7 @@ template <class Source>
Handle<String> Bootstrapper::SourceLookup(int index) {
DCHECK(0 <= index && index < Source::GetBuiltinsCount());
Heap* heap = isolate_->heap();
- if (Source::GetSourceCache(heap)->get(index)->IsUndefined()) {
+ if (Source::GetSourceCache(heap)->get(index)->IsUndefined(isolate_)) {
// We can use external strings for the natives.
Vector<const char> source = Source::GetScriptSource(index);
NativesExternalStringResource* resource =
@@ -109,9 +109,10 @@ void Bootstrapper::TearDownExtensions() {
void DeleteNativeSources(Object* maybe_array) {
if (maybe_array->IsFixedArray()) {
FixedArray* array = FixedArray::cast(maybe_array);
+ Isolate* isolate = array->GetIsolate();
for (int i = 0; i < array->length(); i++) {
Object* natives_source = array->get(i);
- if (!natives_source->IsUndefined()) {
+ if (!natives_source->IsUndefined(isolate)) {
const NativesExternalStringResource* resource =
reinterpret_cast<const NativesExternalStringResource*>(
ExternalOneByteString::cast(natives_source)->resource());
@@ -890,7 +891,7 @@ static void AddToWeakNativeContextList(Context* context) {
DCHECK(context->next_context_link()->IsUndefined());
// Check that context is not in the list yet.
for (Object* current = heap->native_contexts_list();
- !current->IsUndefined();
+ !current->IsUndefined(heap->isolate());
current = Context::cast(current)->next_context_link()) {
DCHECK(current != context);
}
@@ -965,7 +966,7 @@ Handle<JSGlobalObject> Genesis::CreateNewGlobals(
FunctionTemplateInfo::cast(data->constructor()));
Handle<Object> proto_template(global_constructor->prototype_template(),
isolate());
- if (!proto_template->IsUndefined()) {
+ if (!proto_template->IsUndefined(isolate())) {
js_global_object_template =
Handle<ObjectTemplateInfo>::cast(proto_template);
}
@@ -3566,7 +3567,7 @@ void Genesis::TransferNamedProperties(Handle<JSObject> from,
DCHECK(properties->ValueAt(i)->IsPropertyCell());
Handle<PropertyCell> cell(PropertyCell::cast(properties->ValueAt(i)));
Handle<Object> value(cell->value(), isolate());
- if (value->IsTheHole()) continue;
+ if (value->IsTheHole(isolate())) continue;
PropertyDetails details = cell->property_details();
DCHECK_EQ(kData, details.kind());
JSObject::AddProperty(to, key, value, details.attributes());
@@ -3589,7 +3590,7 @@ void Genesis::TransferNamedProperties(Handle<JSObject> from,
Handle<Object> value = Handle<Object>(properties->ValueAt(i),
isolate());
DCHECK(!value->IsCell());
- DCHECK(!value->IsTheHole());
+ DCHECK(!value->IsTheHole(isolate()));
PropertyDetails details = properties->DetailsAt(i);
DCHECK_EQ(kData, details.kind());
JSObject::AddProperty(to, key, value, details.attributes());
« no previous file with comments | « src/ast/ast.cc ('k') | src/builtins.cc » ('j') | src/debug/debug.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698