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

Unified Diff: src/factory.cc

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase master Created 4 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 | « src/elements.cc ('k') | src/frames.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 3df1ca77c006e69c9f5037fd42fc255b954f0acb..34c2bc5c69cd4a98ad5c3e2c2d189a8e67f92873 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1236,7 +1236,7 @@ Handle<JSFunction> Factory::NewFunction(Handle<Map> map,
Handle<SharedFunctionInfo> info =
NewSharedFunctionInfo(name, code, map->is_constructor());
DCHECK(is_sloppy(info->language_mode()));
- DCHECK(!map->IsUndefined());
+ DCHECK(!map->IsUndefined(isolate()));
DCHECK(
map.is_identical_to(isolate()->sloppy_function_map()) ||
map.is_identical_to(isolate()->sloppy_function_without_prototype_map()) ||
@@ -1302,7 +1302,7 @@ Handle<JSFunction> Factory::NewFunction(Handle<String> name, Handle<Code> code,
// NewFunctionPrototype already handles finding an appropriately
// shared prototype?
if (!function->shared()->is_resumable()) {
- if (prototype->IsTheHole()) {
+ if (prototype->IsTheHole(isolate())) {
prototype = NewFunctionPrototype(function);
} else if (install_constructor) {
JSObject::AddProperty(Handle<JSObject>::cast(prototype),
@@ -2220,7 +2220,7 @@ Handle<String> Factory::NumberToString(Handle<Object> number,
isolate()->counters()->number_to_string_runtime()->Increment();
if (check_number_string_cache) {
Handle<Object> cached = GetNumberStringCache(number);
- if (!cached->IsUndefined()) return Handle<String>::cast(cached);
+ if (!cached->IsUndefined(isolate())) return Handle<String>::cast(cached);
}
char arr[100];
@@ -2326,7 +2326,7 @@ Handle<Map> Factory::ObjectLiteralMapFromCache(Handle<Context> context,
int cache_index = number_of_properties - 1;
Handle<Object> maybe_cache(context->map_cache(), isolate());
- if (maybe_cache->IsUndefined()) {
+ if (maybe_cache->IsUndefined(isolate())) {
// Allocate the new map cache for the native context.
maybe_cache = NewFixedArray(kMapCacheSize, TENURED);
context->set_map_cache(*maybe_cache);
« no previous file with comments | « src/elements.cc ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698