OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 12539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
12550 RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugGetPrototype) { | 12550 RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugGetPrototype) { |
12551 ASSERT(args.length() == 1); | 12551 ASSERT(args.length() == 1); |
12552 | 12552 |
12553 CONVERT_ARG_CHECKED(JSObject, obj, 0); | 12553 CONVERT_ARG_CHECKED(JSObject, obj, 0); |
12554 | 12554 |
12555 // Use the __proto__ accessor. | 12555 // Use the __proto__ accessor. |
12556 return Accessors::ObjectPrototype.getter(obj, NULL); | 12556 return Accessors::ObjectPrototype.getter(obj, NULL); |
12557 } | 12557 } |
12558 | 12558 |
12559 | 12559 |
12560 // 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
| |
12561 RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugSetScriptSource) { | |
12562 HandleScope scope(isolate); | |
12563 ASSERT(args.length() == 2); | |
12564 | |
12565 CONVERT_ARG_HANDLE_CHECKED(JSValue, script_wrapper, 0); | |
12566 Handle<String> source(String::cast(args[1])); | |
12567 | |
12568 RUNTIME_ASSERT(script_wrapper->value()->IsScript()); | |
12569 Handle<Script> script(Script::cast(script_wrapper->value())); | |
12570 | |
12571 script->set_source(*source); | |
12572 | |
12573 return isolate->heap()->undefined_value(); | |
12574 } | |
12575 | |
12576 | |
12560 RUNTIME_FUNCTION(MaybeObject*, Runtime_SystemBreak) { | 12577 RUNTIME_FUNCTION(MaybeObject*, Runtime_SystemBreak) { |
12561 ASSERT(args.length() == 0); | 12578 ASSERT(args.length() == 0); |
12562 CPU::DebugBreak(); | 12579 CPU::DebugBreak(); |
12563 return isolate->heap()->undefined_value(); | 12580 return isolate->heap()->undefined_value(); |
12564 } | 12581 } |
12565 | 12582 |
12566 | 12583 |
12567 RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugDisassembleFunction) { | 12584 RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugDisassembleFunction) { |
12568 #ifdef DEBUG | 12585 #ifdef DEBUG |
12569 HandleScope scope(isolate); | 12586 HandleScope scope(isolate); |
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
13621 // Handle last resort GC and make sure to allow future allocations | 13638 // Handle last resort GC and make sure to allow future allocations |
13622 // to grow the heap without causing GCs (if possible). | 13639 // to grow the heap without causing GCs (if possible). |
13623 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13640 isolate->counters()->gc_last_resort_from_js()->Increment(); |
13624 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13641 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
13625 "Runtime::PerformGC"); | 13642 "Runtime::PerformGC"); |
13626 } | 13643 } |
13627 } | 13644 } |
13628 | 13645 |
13629 | 13646 |
13630 } } // namespace v8::internal | 13647 } } // namespace v8::internal |
OLD | NEW |