Chromium Code Reviews| 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); |