Reviewers: ,

Description:
Fix compilation when disabling debugger support.


Please review this at https://chromiumcodereview.appspot.com/10702093/

SVN Base: ssh://dinauz.org/home/ivoire/projects/v8.git@master

Affected files:
  M samples/lineprocessor.cc
  M src/liveedit.cc
  M src/runtime.cc
  M test/cctest/test-heap-profiler.cc


Index: samples/lineprocessor.cc
diff --git a/samples/lineprocessor.cc b/samples/lineprocessor.cc
index 23e02142691dd1541b04c34d8fc2fb20717e069e..b9d2f381cb862cc70bce07716850d57d4daa2c07 100644
--- a/samples/lineprocessor.cc
+++ b/samples/lineprocessor.cc
@@ -31,7 +31,9 @@
 // are responsible for debugging support.
 // Note that V8 itself should be compiled with enabled debugger support
 // to have it all working.
-#define SUPPORT_DEBUGGING
+#ifdef ENABLE_DEBUGGER_SUPPORT
+# define SUPPORT_DEBUGGING
+#endif

 #include <v8.h>

Index: src/liveedit.cc
diff --git a/src/liveedit.cc b/src/liveedit.cc
index 0b8654b468302816a64bf38afbb3c0b036c8930c..d86314c507024101f6fc1d0e5715f86b3253a39f 100644
--- a/src/liveedit.cc
+++ b/src/liveedit.cc
@@ -1878,7 +1878,8 @@ LiveEditFunctionTracker::~LiveEditFunctionTracker() {


 void LiveEditFunctionTracker::RecordFunctionInfo(
-    Handle<SharedFunctionInfo> info, FunctionLiteral* lit) {
+    Handle<SharedFunctionInfo> info, FunctionLiteral* lit,
+    Zone* zone) {
 }


Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 74f3e43ada4e995fd26ba6c038a1ac008598db16..1db187df9586d64d442582a95cda704b37358c08 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -4905,6 +4905,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugCallbackSupportsStepping) {
 // Set one shot breakpoints for the callback function that is passed to a
// built-in function such as Array.forEach to enable stepping into the callback.
 RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugPrepareStepInIfStepping) {
+#ifdef ENABLE_DEBUGGER_SUPPORT
   Debug* debug = isolate->debug();
   if (!debug->IsStepping()) return NULL;
   CONVERT_ARG_HANDLE_CHECKED(JSFunction, callback, 0);
@@ -4914,6 +4915,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugPrepareStepInIfStepping) {
   // again, we need to clear the step out at this point.
   debug->ClearStepOut();
   debug->FloodWithOneShot(callback);
+#endif
   return NULL;
 }

Index: test/cctest/test-heap-profiler.cc
diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc index 59113e064919f199c2f4783c21ff4fad768476ce..c9a2f40988576678093e727196a57567610df34c 100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -1563,7 +1563,9 @@ TEST(NoDebugObjectInSnapshot) {
   v8::HandleScope scope;
   LocalContext env;

+#ifdef ENABLE_DEBUGGER_SUPPORT
   v8::internal::Isolate::Current()->debug()->Load();
+#endif
   CompileRun("foo = {};");
   const v8::HeapSnapshot* snapshot =
       v8::HeapProfiler::TakeSnapshot(v8_str("snapshot"));


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

Reply via email to