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

Unified Diff: src/ic/ic.cc

Issue 467013003: Add interceptor support for symbols (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Updated to filter out non-symbol keys from for-in enumeration Created 6 years, 4 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/objects.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 46bd43541762a1956e37b96ddfd8152fed72d8e0..a5224f58468d4838e64a8bf579daffcdaa2b6c64 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -3067,19 +3067,17 @@ RUNTIME_FUNCTION(StoreCallbackProperty) {
*/
RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly) {
DCHECK(args.length() == NamedLoadHandlerCompiler::kInterceptorArgsLength);
- Handle<Name> name_handle =
+ Handle<Name> name =
args.at<Name>(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex);
Handle<InterceptorInfo> interceptor_info = args.at<InterceptorInfo>(
NamedLoadHandlerCompiler::kInterceptorArgsInfoIndex);
- // TODO(rossberg): Support symbols in the API.
- if (name_handle->IsSymbol())
+ if (name->IsSymbol() && !interceptor_info->can_intercept_symbols())
return isolate->heap()->no_interceptor_result_sentinel();
- Handle<String> name = Handle<String>::cast(name_handle);
Address getter_address = v8::ToCData<Address>(interceptor_info->getter());
- v8::NamedPropertyGetterCallback getter =
- FUNCTION_CAST<v8::NamedPropertyGetterCallback>(getter_address);
+ v8::GenericNamedPropertyGetterCallback getter =
+ FUNCTION_CAST<v8::GenericNamedPropertyGetterCallback>(getter_address);
DCHECK(getter != NULL);
Handle<JSObject> receiver =
« no previous file with comments | « src/elements.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698