Author: [email protected]
Date: Thu Apr 16 15:31:44 2009
New Revision: 1730

Modified:
    trunk/   (props changed)
    trunk/src/api.cc
    trunk/src/debug.cc
    trunk/src/regexp-macro-assembler-irregexp-inl.h   (props changed)
    trunk/test/cctest/test-debug.cc
    trunk/test/mjsunit/global-load-from-eval-in-with.js   (props changed)
    trunk/test/mjsunit/local-load-from-eval.js   (props changed)
    trunk/test/mjsunit/property-load-across-eval.js   (props changed)
    trunk/test/mjsunit/regress/regress-269.js   (props changed)

Log:
Merge r1718 to trunk.



Review URL: http://codereview.chromium.org/79019

Modified: trunk/src/api.cc
==============================================================================
--- trunk/src/api.cc    (original)
+++ trunk/src/api.cc    Thu Apr 16 15:31:44 2009
@@ -2373,7 +2373,7 @@


  const char* v8::V8::GetVersion() {
-  return "1.1.10";
+  return "1.1.10.1";
  }



Modified: trunk/src/debug.cc
==============================================================================
--- trunk/src/debug.cc  (original)
+++ trunk/src/debug.cc  Thu Apr 16 15:31:44 2009
@@ -1825,6 +1825,9 @@
          Debugger::host_dispatch_handler_(reinterpret_cast<void*>(dispatch),
                                            
Debugger::host_dispatch_handler_data_);
        }
+      if (auto_continue && !HasCommands()) {
+        return;
+      }
        continue;
      }

@@ -2030,6 +2033,8 @@
    Logger::DebugTag("Put command on command_queue.");
    command_queue_.Put(command_copy);
    command_received_->Signal();
+
+  // Set the debug command break flag to have the command processed.
    if (!Debug::InDebugger()) {
      StackGuard::DebugCommand();
    }
@@ -2042,7 +2047,7 @@


  void Debugger::ProcessHostDispatch(void* dispatch) {
-// Puts a host dispatch comming from the public API on the queue.
+  // Puts a host dispatch comming from the public API on the queue.
    uint16_t hack[3];
    hack[0] = 0;
    hack[1] = reinterpret_cast<uint32_t>(dispatch) >> 16;
@@ -2050,6 +2055,11 @@
    Logger::DebugTag("Put dispatch on command_queue.");
    command_queue_.Put(Vector<uint16_t>(hack, 3).Clone());
    command_received_->Signal();
+
+  // Set the debug command break flag to have the host dispatch processed.
+  if (!Debug::InDebugger()) {
+    StackGuard::DebugCommand();
+  }
  }



Modified: trunk/test/cctest/test-debug.cc
==============================================================================
--- trunk/test/cctest/test-debug.cc     (original)
+++ trunk/test/cctest/test-debug.cc     Thu Apr 16 15:31:44 2009
@@ -4025,19 +4025,33 @@
       "\"type\":\"request\","
       "\"command\":\"continue\"}";

+  // Create an empty function to call for processing debug commands
+  v8::Local<v8::Function> empty =
+      CompileFunction(&env, "function empty(){}", "empty");
+
    // Setup message and host dispatch handlers.
    v8::Debug::SetMessageHandler(DummyMessageHandler);
    v8::Debug::SetHostDispatchHandler(HostDispatchHandlerHitCount,
                                      NULL);

-  // Fill a host dispatch and a continue command on the command queue  
before
-  // running some code.
+  // Send a host dispatch by itself.
+  v8::Debug::SendHostDispatch(NULL);
+  empty->Call(env->Global(), 0, NULL);  // Run JavaScript to activate  
debugger.
+  CHECK_EQ(1, host_dispatch_hit_count);
+
+  // Fill a host dispatch and a continue command on the command queue.
    v8::Debug::SendHostDispatch(NULL);
    v8::Debug::SendCommand(buffer, AsciiToUtf16(command_continue, buffer));
-  CompileRun("void 0");
+  empty->Call(env->Global(), 0, NULL);  // Run JavaScript to activate  
debugger.

-  // The host dispatch callback should be called.
-  CHECK_EQ(1, host_dispatch_hit_count);
+  // Fill a continue command and a host dispatch on the command queue.
+  v8::Debug::SendCommand(buffer, AsciiToUtf16(command_continue, buffer));
+  v8::Debug::SendHostDispatch(NULL);
+  empty->Call(env->Global(), 0, NULL);  // Run JavaScript to activate  
debugger.
+  empty->Call(env->Global(), 0, NULL);  // Run JavaScript to activate  
debugger.
+
+  // All the host dispatch callback should be called.
+  CHECK_EQ(3, host_dispatch_hit_count);
  }



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to