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

Unified Diff: src/ic/call-optimization.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/ic/arm64/handler-compiler-arm64.cc ('k') | src/ic/handler-compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/call-optimization.cc
diff --git a/src/ic/call-optimization.cc b/src/ic/call-optimization.cc
index 571b614dde3b4bf7d04e410c7699d531d588532c..f7a1f6982fa74d53c8075bebf294901f660cfb2b 100644
--- a/src/ic/call-optimization.cc
+++ b/src/ic/call-optimization.cc
@@ -89,11 +89,12 @@ bool CallOptimization::IsCompatibleReceiverMap(Handle<Map> map,
void CallOptimization::Initialize(
Handle<FunctionTemplateInfo> function_template_info) {
- if (function_template_info->call_code()->IsUndefined()) return;
+ Isolate* isolate = function_template_info->GetIsolate();
+ if (function_template_info->call_code()->IsUndefined(isolate)) return;
api_call_info_ =
handle(CallHandlerInfo::cast(function_template_info->call_code()));
- if (!function_template_info->signature()->IsUndefined()) {
+ if (!function_template_info->signature()->IsUndefined(isolate)) {
expected_receiver_type_ =
handle(FunctionTemplateInfo::cast(function_template_info->signature()));
}
@@ -110,15 +111,17 @@ void CallOptimization::Initialize(Handle<JSFunction> function) {
void CallOptimization::AnalyzePossibleApiFunction(Handle<JSFunction> function) {
if (!function->shared()->IsApiFunction()) return;
- Handle<FunctionTemplateInfo> info(function->shared()->get_api_func_data());
+ Isolate* isolate = function->GetIsolate();
+ Handle<FunctionTemplateInfo> info(function->shared()->get_api_func_data(),
+ isolate);
// Require a C++ callback.
- if (info->call_code()->IsUndefined()) return;
- api_call_info_ = handle(CallHandlerInfo::cast(info->call_code()));
+ if (info->call_code()->IsUndefined(isolate)) return;
+ api_call_info_ = handle(CallHandlerInfo::cast(info->call_code()), isolate);
- if (!info->signature()->IsUndefined()) {
+ if (!info->signature()->IsUndefined(isolate)) {
expected_receiver_type_ =
- handle(FunctionTemplateInfo::cast(info->signature()));
+ handle(FunctionTemplateInfo::cast(info->signature()), isolate);
}
is_simple_api_call_ = true;
« no previous file with comments | « src/ic/arm64/handler-compiler-arm64.cc ('k') | src/ic/handler-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698