Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 713d4501ae5dfe521f6d28d743335366019db7a4..308853bed3b7dd8f08a9f19f1a4261af8e80bc72 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -629,7 +629,14 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_CreatePrivateSymbol) { |
} |
-RUNTIME_FUNCTION(MaybeObject*, Runtime_SymbolName) { |
+RUNTIME_FUNCTION(MaybeObject*, Runtime_NewSymbolWrapper) { |
+ ASSERT(args.length() == 1); |
+ CONVERT_ARG_CHECKED(Symbol, symbol, 0); |
+ return symbol->ToObject(isolate); |
+} |
+ |
+ |
+RUNTIME_FUNCTION(MaybeObject*, Runtime_SymbolDescription) { |
SealHandleScope shs(isolate); |
ASSERT(args.length() == 1); |
CONVERT_ARG_CHECKED(Symbol, symbol, 0); |
@@ -11333,15 +11340,18 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetFrameDetails) { |
// THIS MUST BE DONE LAST SINCE WE MIGHT ADVANCE |
// THE FRAME ITERATOR TO WRAP THE RECEIVER. |
Handle<Object> receiver(it.frame()->receiver(), isolate); |
- if (!receiver->IsJSObject() && |
- shared->is_classic_mode() && |
- !function->IsBuiltin()) { |
+ if (receiver->IsSymbol() || |
+ (!receiver->IsJSObject() && |
+ shared->is_classic_mode() && |
+ !function->IsBuiltin())) { |
// If the receiver is not a JSObject and the function is not a |
// builtin or strict-mode we have hit an optimization where a |
// value object is not converted into a wrapped JS objects. To |
// hide this optimization from the debugger, we wrap the receiver |
// by creating correct wrapper object based on the calling frame's |
// native context. |
+ // Symbol receivers are always exempted as their (strict) builtins |
+ // only work over the wrapped form. |
it.Advance(); |
Handle<Context> calling_frames_native_context( |
Context::cast(Context::cast(it.frame()->context())->native_context())); |