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

Unified Diff: src/stub-cache.cc

Issue 459413002: Support symbol-named properties in API (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Include a bit that was missing from the previous patch 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
« src/api.cc ('K') | « src/objects.cc ('k') | test/cctest/test-alloc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/stub-cache.cc
diff --git a/src/stub-cache.cc b/src/stub-cache.cc
index f959e924988a8f0a72ab1e9961b668dbea345328..a87a23f6477e6c4a171460a69d1cda0b1043f16e 100644
--- a/src/stub-cache.cc
+++ b/src/stub-cache.cc
@@ -503,18 +503,14 @@ RUNTIME_FUNCTION(StoreCallbackProperty) {
DCHECK(callback->IsCompatibleReceiver(*receiver));
Address setter_address = v8::ToCData<Address>(callback->setter());
- v8::AccessorSetterCallback fun =
- FUNCTION_CAST<v8::AccessorSetterCallback>(setter_address);
+ v8::AccessorNameSetterCallback fun =
+ FUNCTION_CAST<v8::AccessorNameSetterCallback>(setter_address);
DCHECK(fun != NULL);
- // TODO(rossberg): Support symbols in the API.
- if (name->IsSymbol()) return *value;
- Handle<String> str = Handle<String>::cast(name);
-
LOG(isolate, ApiNamedPropertyAccess("store", *receiver, *name));
PropertyCallbackArguments custom_args(isolate, callback->data(), *receiver,
*holder);
- custom_args.Call(fun, v8::Utils::ToLocal(str), v8::Utils::ToLocal(value));
+ custom_args.Call(fun, v8::Utils::ToLocal(name), v8::Utils::ToLocal(value));
RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate);
return *value;
}
« src/api.cc ('K') | « src/objects.cc ('k') | test/cctest/test-alloc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698