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

Unified Diff: src/stub-cache.cc

Issue 467013003: Add interceptor support for symbols (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
Index: src/stub-cache.cc
diff --git a/src/stub-cache.cc b/src/stub-cache.cc
index a87a23f6477e6c4a171460a69d1cda0b1043f16e..87d479f17e81e4a4b15706cf785abf6854d2429f 100644
--- a/src/stub-cache.cc
+++ b/src/stub-cache.cc
@@ -525,19 +525,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 =
« src/objects.cc ('K') | « src/objects-inl.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698