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

Unified Diff: src/api-natives.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/api.cc ('k') | src/ast/ast.cc » ('j') | src/debug/debug.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api-natives.cc
diff --git a/src/api-natives.cc b/src/api-natives.cc
index fcd19ccadad7b364599d830ac72f90c0a40c5ace..5ca064c77fc953a43fc6f59ffff641b66e5de60a 100644
--- a/src/api-natives.cc
+++ b/src/api-natives.cc
@@ -185,9 +185,9 @@ MaybeHandle<JSObject> ConfigureInstance(Isolate* isolate, Handle<JSObject> obj,
int max_number_of_properties = 0;
TemplateInfoT* info = *data;
while (info != nullptr) {
- if (!info->property_accessors()->IsUndefined()) {
+ if (!info->property_accessors()->IsUndefined(isolate)) {
Object* props = info->property_accessors();
- if (!props->IsUndefined()) {
+ if (!props->IsUndefined(isolate)) {
Handle<Object> props_handle(props, isolate);
NeanderArray props_array(props_handle);
max_number_of_properties += props_array.length();
@@ -205,7 +205,7 @@ MaybeHandle<JSObject> ConfigureInstance(Isolate* isolate, Handle<JSObject> obj,
info = *data;
while (info != nullptr) {
// Accumulate accessors.
- if (!info->property_accessors()->IsUndefined()) {
+ if (!info->property_accessors()->IsUndefined(isolate)) {
Handle<Object> props(info->property_accessors(), isolate);
valid_descriptors =
AccessorInfo::AppendUnique(props, array, valid_descriptors);
@@ -221,7 +221,7 @@ MaybeHandle<JSObject> ConfigureInstance(Isolate* isolate, Handle<JSObject> obj,
}
auto property_list = handle(data->property_list(), isolate);
- if (property_list->IsUndefined()) return obj;
+ if (property_list->IsUndefined(isolate)) return obj;
// TODO(dcarney): just use a FixedArray here.
NeanderArray properties(property_list);
if (properties.length() == 0) return obj;
@@ -323,7 +323,7 @@ MaybeHandle<JSObject> InstantiateObject(Isolate* isolate,
if (constructor.is_null()) {
Handle<Object> cons(info->constructor(), isolate);
- if (cons->IsUndefined()) {
+ if (cons->IsUndefined(isolate)) {
constructor = isolate->object_function();
} else {
auto cons_templ = Handle<FunctionTemplateInfo>::cast(cons);
@@ -371,7 +371,7 @@ MaybeHandle<JSFunction> InstantiateFunction(Isolate* isolate,
Handle<JSObject> prototype;
if (!data->remove_prototype()) {
auto prototype_templ = handle(data->prototype_template(), isolate);
- if (prototype_templ->IsUndefined()) {
+ if (prototype_templ->IsUndefined(isolate)) {
prototype = isolate->factory()->NewJSObject(isolate->object_function());
} else {
ASSIGN_RETURN_ON_EXCEPTION(
@@ -382,7 +382,7 @@ MaybeHandle<JSFunction> InstantiateFunction(Isolate* isolate,
JSFunction);
}
auto parent = handle(data->parent_template(), isolate);
- if (!parent->IsUndefined()) {
+ if (!parent->IsUndefined(isolate)) {
Handle<JSFunction> parent_instance;
ASSIGN_RETURN_ON_EXCEPTION(
isolate, parent_instance,
@@ -445,7 +445,7 @@ class InvokeScope {
void AddPropertyToPropertyList(Isolate* isolate, Handle<TemplateInfo> templ,
int length, Handle<Object>* data) {
auto list = handle(templ->property_list(), isolate);
- if (list->IsUndefined()) {
+ if (list->IsUndefined(isolate)) {
list = NeanderArray(isolate).value();
templ->set_property_list(*list);
}
@@ -520,7 +520,7 @@ void ApiNatives::AddNativeDataProperty(Isolate* isolate,
Handle<TemplateInfo> info,
Handle<AccessorInfo> property) {
auto list = handle(info->property_accessors(), isolate);
- if (list->IsUndefined()) {
+ if (list->IsUndefined(isolate)) {
list = NeanderArray(isolate).value();
info->set_property_accessors(*list);
}
@@ -550,7 +550,7 @@ Handle<JSFunction> ApiNatives::CreateApiFunction(
isolate->factory()->empty_string(), code);
} else {
int internal_field_count = 0;
- if (!obj->instance_template()->IsUndefined()) {
+ if (!obj->instance_template()->IsUndefined(isolate)) {
Handle<ObjectTemplateInfo> instance_template = Handle<ObjectTemplateInfo>(
ObjectTemplateInfo::cast(obj->instance_template()));
internal_field_count =
@@ -564,8 +564,8 @@ Handle<JSFunction> ApiNatives::CreateApiFunction(
switch (instance_type) {
case JavaScriptObjectType:
if (!obj->needs_access_check() &&
- obj->named_property_handler()->IsUndefined() &&
- obj->indexed_property_handler()->IsUndefined()) {
+ obj->named_property_handler()->IsUndefined(isolate) &&
+ obj->indexed_property_handler()->IsUndefined(isolate)) {
type = JS_API_OBJECT_TYPE;
} else {
type = JS_SPECIAL_API_OBJECT_TYPE;
@@ -633,15 +633,15 @@ Handle<JSFunction> ApiNatives::CreateApiFunction(
}
// Set interceptor information in the map.
- if (!obj->named_property_handler()->IsUndefined()) {
+ if (!obj->named_property_handler()->IsUndefined(isolate)) {
map->set_has_named_interceptor();
}
- if (!obj->indexed_property_handler()->IsUndefined()) {
+ if (!obj->indexed_property_handler()->IsUndefined(isolate)) {
map->set_has_indexed_interceptor();
}
// Mark instance as callable in the map.
- if (!obj->instance_call_handler()->IsUndefined()) {
+ if (!obj->instance_call_handler()->IsUndefined(isolate)) {
map->set_is_callable();
map->set_is_constructor(true);
}
« no previous file with comments | « src/api.cc ('k') | src/ast/ast.cc » ('j') | src/debug/debug.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698