Chromium Code Reviews| Index: src/runtime.cc |
| =================================================================== |
| --- src/runtime.cc (revision 10875) |
| +++ src/runtime.cc (working copy) |
| @@ -12557,6 +12557,23 @@ |
| } |
| +// Patches script source (should be called upon BeforeCompile event). |
|
yurys
2012/03/13 17:09:30
We should check here that the script source is not
|
| +RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugSetScriptSource) { |
| + HandleScope scope(isolate); |
| + ASSERT(args.length() == 2); |
| + |
| + CONVERT_ARG_HANDLE_CHECKED(JSValue, script_wrapper, 0); |
| + Handle<String> source(String::cast(args[1])); |
| + |
| + RUNTIME_ASSERT(script_wrapper->value()->IsScript()); |
| + Handle<Script> script(Script::cast(script_wrapper->value())); |
| + |
| + script->set_source(*source); |
| + |
| + return isolate->heap()->undefined_value(); |
| +} |
| + |
| + |
| RUNTIME_FUNCTION(MaybeObject*, Runtime_SystemBreak) { |
| ASSERT(args.length() == 0); |
| CPU::DebugBreak(); |