Commits

Andrew Sutherland committed 8528bc3

de-bitrot

  • Participants
  • Parent commits 23ccf48

Comments (0)

Files changed (1)

 # HG changeset patch
-# Parent f083cea597c9dd89209302d6739c18a648620b12
+# Parent e421278596564dbbf75ea1b322f5086c797b18d3
 
 diff --git a/js/src/jsinterp.cpp b/js/src/jsinterp.cpp
 --- a/js/src/jsinterp.cpp
 +++ b/js/src/jsinterp.cpp
-@@ -509,17 +509,23 @@ js::InvokeKernel(JSContext *cx, CallArgs
-     StackFrame *fp = ifg.fp();
-     if (!fp->functionPrologue(cx))
+@@ -526,7 +526,10 @@
          return false;
  
      /* Run function until JSOP_STOP, JSOP_RETURN or error. */
-     JSBool ok;
-     {
-         AutoPreserveEnumerators preserve(cx);
--        ok = RunScript(cx, fun->script(), fp);
-+        JSScript *script = fun->script();
-+
-+        Probes::startExecution(cx, script);
-+
-+        ok = RunScript(cx, script, fp);
-+
-+        Probes::stopExecution(cx, script);
-     }
+-    JSBool ok = RunScript(cx, fun->script(), fp);
++    JSScript *script = fun->script();
++    Probes::startExecution(cx, script);
++    JSBool ok = RunScript(cx, script, fp);
++    Probes::stopExecution(cx, script);
  
+     /* Propagate the return value out. */
      args.rval() = fp->returnValue();
-     JS_ASSERT_IF(ok && construct, !args.rval().isPrimitive());
-     return ok;
- }
- 
- bool
 diff --git a/js/src/jsprobedefs.cpp b/js/src/jsprobedefs.cpp
 --- a/js/src/jsprobedefs.cpp
 +++ b/js/src/jsprobedefs.cpp
-@@ -213,16 +213,44 @@ compartment_id(JSRuntime *rt, ProbeValue
- bool
- env_currentTimeMS(JSRuntime *rt, ProbeValue *arg)
- {
-     JS_ASSERT(arg->ty == ProbeType_DummyGlobal);
-     PROBE_VALUE_SET(arg, double, (double)(PR_Now()/PR_USEC_PER_MSEC));
+@@ -218,6 +218,34 @@
      return true;
  }
  
  js::Value
  deserialize_size_t(JSContext *cx, ProbeValue v)
  {
-     return js::DoubleValue((double)v.data.as_size_t);
- }
- 
- js::Value
- deserialize_intptr_t(JSContext *cx, ProbeValue v)
 diff --git a/js/src/jsprobedefs.h b/js/src/jsprobedefs.h
 --- a/js/src/jsprobedefs.h
 +++ b/js/src/jsprobedefs.h
-@@ -151,16 +151,19 @@ bool runtime_gcBytes(JSRuntime *rt, Prob
- bool runtime_gcMaxBytes(JSRuntime *rt, ProbeValue *val);
- bool runtime_gcMaxMallocBytes(JSRuntime *rt, ProbeValue *val);
- bool compartment_runtime(JSRuntime *rt, ProbeValue *val);
- bool compartment_gcBytes(JSRuntime *rt, ProbeValue *val);
- bool compartment_gcTriggerBytes(JSRuntime *rt, ProbeValue *val);
+@@ -156,6 +156,9 @@
  bool compartment_gcLastBytes(JSRuntime *rt, ProbeValue *val);
  bool compartment_id(JSRuntime *rt, ProbeValue *val);
  bool env_currentTimeMS(JSRuntime *rt, ProbeValue *val);
  
  js::Value deserialize_size_t(JSContext *cx, ProbeValue val);
  js::Value deserialize_intptr_t(JSContext *cx, ProbeValue val);
- js::Value deserialize_int(JSContext *cx, ProbeValue val);
- js::Value deserialize_double(JSContext *cx, ProbeValue val);
- js::Value deserialize_OwnedSCBufferPtr(JSContext *cx, ProbeValue val);    
- js::Value deserialize_OwnedConstCharPtr(JSContext *cx, ProbeValue val);
-     
 diff --git a/js/src/jsprobes.h b/js/src/jsprobes.h
 --- a/js/src/jsprobes.h
 +++ b/js/src/jsprobes.h
-@@ -829,16 +829,23 @@ Probes::startExecution(JSContext *cx, JS
-     if (JAVASCRIPT_EXECUTE_START_ENABLED())
-         JAVASCRIPT_EXECUTE_START((script->filename ? (char *)script->filename : nullName),
-                                  script->lineno);
- #endif
- #ifdef MOZ_ETW
+@@ -834,6 +834,13 @@
      if (ProfilingActive && !ETWStartExecution(cx, script))
          ok = false;
  #endif
  
      return ok;
  }
- 
- inline bool
- Probes::stopExecution(JSContext *cx, JSScript *script)
- {
-     bool ok = true;
-@@ -847,16 +854,23 @@ Probes::stopExecution(JSContext *cx, JSS
-     if (JAVASCRIPT_EXECUTE_DONE_ENABLED())
-         JAVASCRIPT_EXECUTE_DONE((script->filename ? (char *)script->filename : nullName),
-                                 script->lineno);
- #endif
- #ifdef MOZ_ETW
+@@ -852,6 +859,13 @@
      if (ProfilingActive && !ETWStopExecution(cx, script))
          ok = false;
  #endif
  
      return ok;
  }
- 
- struct AutoFunctionCallProbe {
-     JSContext * const cx;
-     JSFunction *fun;
-     JSScript *script;
 diff --git a/js/src/jsprobes.tbl b/js/src/jsprobes.tbl
 --- a/js/src/jsprobes.tbl
 +++ b/js/src/jsprobes.tbl
-@@ -198,16 +198,19 @@ PROBE_TRANS(runtime_gcBytes,            
- PROBE_TRANS(runtime_gcMaxBytes,            gcMaxBytes,         2,  JSRuntimePtr,        size_t)
- PROBE_TRANS(runtime_gcMaxMallocBytes,      gcMaxMallocBytes,   3,  JSRuntimePtr,        size_t)
- PROBE_TRANS(compartment_runtime,           runtime,            4,  JSCompartmentPtr,    JSRuntimePtr)
- PROBE_TRANS(compartment_gcBytes,           gcBytes,            5,  JSCompartmentPtr,    size_t)
- PROBE_TRANS(compartment_gcTriggerBytes,    gcTriggerBytes,     6,  JSCompartmentPtr,    size_t)
+@@ -203,6 +203,9 @@
  PROBE_TRANS(compartment_gcLastBytes,       gcLastBytes,        7,  JSCompartmentPtr,    size_t)
  PROBE_TRANS(compartment_id,                id,                 8,  JSCompartmentPtr,    intptr_t)
  PROBE_TRANS(env_currentTimeMS,             currentTimeMS,      9,  DummyGlobal,         double)
  
  /* teardown PROBE_POINT helpers */
  #undef _NO_ARGS
- #undef _ARG
- #undef _ARG_1
- #undef _ARG_2
- #undef _ARG_3
- #undef _ARG_4
 diff --git a/toolkit/components/probes/ProbeService.cpp b/toolkit/components/probes/ProbeService.cpp
 --- a/toolkit/components/probes/ProbeService.cpp
 +++ b/toolkit/components/probes/ProbeService.cpp
-@@ -396,17 +396,17 @@ ProbeServiceImpl::AsyncQuery(const nsASt
-         return NS_ERROR_FAILURE;
- 
-     nsIScriptContext *scriptCx = GetScriptContextFromJSContext(cx);
-     if (!scriptCx)
-         return NS_ERROR_FAILURE;
+@@ -401,7 +401,7 @@
  
      mListeners.Put(codeCookie, listener);
      mListenerContexts.Put(codeCookie, scriptCx);
  
      return NS_OK;
  }
- 
- NS_IMPL_THREADSAFE_ISUPPORTS1(ProbeServiceImpl, nsIProbeService)
- NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIProbeService, ProbeServiceImpl::CreateInstance)
- 
- #define NS_PROBESERVICE_CID \