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

Unified Diff: src/ic/ic.cc

Issue 962613002: add interceptors which do not mask existing properties (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/handler-compiler.cc ('k') | src/lookup.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 62f82b0de9dfa8362d993666ec2caf141b04d6b4..0ba80d35907c536934ba37beec838afaaf2ba0ca 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -2914,30 +2914,10 @@ RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly) {
Handle<JSObject> holder =
args.at<JSObject>(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex);
HandleScope scope(isolate);
- Handle<InterceptorInfo> interceptor_info(holder->GetNamedInterceptor());
-
- if (name->IsSymbol() && !interceptor_info->can_intercept_symbols())
- return isolate->heap()->no_interceptor_result_sentinel();
-
- Address getter_address = v8::ToCData<Address>(interceptor_info->getter());
- v8::GenericNamedPropertyGetterCallback getter =
- FUNCTION_CAST<v8::GenericNamedPropertyGetterCallback>(getter_address);
- DCHECK(getter != NULL);
-
- PropertyCallbackArguments callback_args(isolate, interceptor_info->data(),
- *receiver, *holder);
- {
- // Use the interceptor getter.
- v8::Handle<v8::Value> r =
- callback_args.Call(getter, v8::Utils::ToLocal(name));
- RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate);
- if (!r.IsEmpty()) {
- Handle<Object> result = v8::Utils::OpenHandle(*r);
- result->VerifyApiCallResultType();
- return *v8::Utils::OpenHandle(*r);
- }
- }
-
+ auto res = JSObject::GetPropertyWithInterceptor(holder, receiver, name);
+ RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate);
+ Handle<Object> result;
+ if (res.ToHandle(&result)) return *result;
return isolate->heap()->no_interceptor_result_sentinel();
}
« no previous file with comments | « src/ic/handler-compiler.cc ('k') | src/lookup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698