summaryrefslogtreecommitdiffstats
path: root/src/execution.cc
diff options
context:
space:
mode:
authorLeon Clarke <leonclarke@google.com>2010-01-19 14:06:41 +0000
committerLeon Clarke <leonclarke@google.com>2010-01-19 16:34:04 +0000
commite46be819fca9468a0cd4e74859ce0f778eb8ca60 (patch)
treef9c37105a3367f2ad5d31fbc2cb37b84fa67b59a /src/execution.cc
parentd0582a6c46733687d045e4188a1bcd0123c758a1 (diff)
downloadandroid_external_v8-e46be819fca9468a0cd4e74859ce0f778eb8ca60.tar.gz
android_external_v8-e46be819fca9468a0cd4e74859ce0f778eb8ca60.tar.bz2
android_external_v8-e46be819fca9468a0cd4e74859ce0f778eb8ca60.zip
New version of v8 from bleeding edge at revision 3649
Diffstat (limited to 'src/execution.cc')
-rw-r--r--src/execution.cc28
1 files changed, 23 insertions, 5 deletions
diff --git a/src/execution.cc b/src/execution.cc
index 2f646a56..a79af237 100644
--- a/src/execution.cc
+++ b/src/execution.cc
@@ -30,6 +30,7 @@
#include "v8.h"
#include "api.h"
+#include "bootstrapper.h"
#include "codegen-inl.h"
#include "debug.h"
#include "simulator.h"
@@ -78,6 +79,10 @@ static Handle<Object> Invoke(bool construct,
receiver = Handle<JSObject>(global->global_receiver());
}
+ // Make sure that the global object of the context we're about to
+ // make the current one is indeed a global object.
+ ASSERT(func->context()->global()->IsGlobalObject());
+
{
// Save and restore context around invocation and block the
// allocation of handles without explicit handle scopes.
@@ -607,6 +612,11 @@ Object* Execution::DebugBreakHelper() {
return Heap::undefined_value();
}
+ // Ignore debug break during bootstrapping.
+ if (Bootstrapper::IsActive()) {
+ return Heap::undefined_value();
+ }
+
{
JavaScriptFrameIterator it;
ASSERT(!it.done());
@@ -628,24 +638,32 @@ Object* Execution::DebugBreakHelper() {
bool debug_command_only =
StackGuard::IsDebugCommand() && !StackGuard::IsDebugBreak();
- // Clear the debug request flags.
+ // Clear the debug break request flag.
StackGuard::Continue(DEBUGBREAK);
+
+ ProcessDebugMesssages(debug_command_only);
+
+ // Return to continue execution.
+ return Heap::undefined_value();
+}
+
+void Execution::ProcessDebugMesssages(bool debug_command_only) {
+ // Clear the debug command request flag.
StackGuard::Continue(DEBUGCOMMAND);
HandleScope scope;
// Enter the debugger. Just continue if we fail to enter the debugger.
EnterDebugger debugger;
if (debugger.FailedToEnter()) {
- return Heap::undefined_value();
+ return;
}
// Notify the debug event listeners. Indicate auto continue if the break was
// a debug command break.
Debugger::OnDebugBreak(Factory::undefined_value(), debug_command_only);
-
- // Return to continue execution.
- return Heap::undefined_value();
}
+
+
#endif
Object* Execution::HandleStackGuardInterrupt() {