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

Unified Diff: src/runtime.cc

Issue 10091022: Issue 2089 Expose value wrapper's inner values (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 8 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/mirror-debugger.js ('K') | « src/runtime.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 3c65d09d2b1dcd06747c54222d65e6e46ef98f41..a20c8ee42401cb89a145b1d238b6a60e7020d618 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -12270,6 +12270,23 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugGetPrototype) {
}
+// Returns internal property PrimitiveValue value for standard objects
+// Boolean, Number and String (not for Date). Otherwise returns undefined.
+// args[0]: the object that possibly holds PrimitiveValue property.
+RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugGetPrimitiveValue) {
+ ASSERT(args.length() == 1);
+
+ CONVERT_ARG_CHECKED(JSObject, obj, 0);
+
+ if (!obj->IsJSValue()) {
+ return isolate->heap()->undefined_value();
+ }
+ JSValue* value = JSValue::cast(obj);
+
+ return value->value();
+}
Yang 2012/04/17 12:48:44 This seems to do the same as %_ValueOf (see FullCo
Peter Rybin 2012/04/18 12:36:09 Done.
+
+
// Patches script source (should be called upon BeforeCompile event).
RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugSetScriptSource) {
HandleScope scope(isolate);
« src/mirror-debugger.js ('K') | « src/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698