Bug 1470558: Use Completion type in Debugger::receiveCompletionValue. r=jorendorff
authorJim Blandy <jimb@mozilla.com>
Sun, 07 Jul 2019 09:47:54 +0000
changeset 544419 f82f7c40443dc5fe196a73a7eb972e332321051e
parent 544418 3f47b78ffdc0e9cd4db77302d7f4143447f84be5
child 544420 4f26d027343a0b26ddfb0410082bc2a46c3d9537
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1470558
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1470558: Use Completion type in Debugger::receiveCompletionValue. r=jorendorff Replacing more calls to Debugger::resultToCompletion with uses of the newer API. Differential Revision: https://phabricator.services.mozilla.com/D33076
js/src/vm/Debugger.cpp
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -2200,23 +2200,19 @@ bool Debugger::newCompletionValue(JSCont
   result.setObject(*obj);
   return true;
 }
 
 bool Debugger::receiveCompletionValue(Maybe<AutoRealm>& ar, bool ok,
                                       HandleValue val, MutableHandleValue vp) {
   JSContext* cx = ar->context();
 
-  ResumeMode resumeMode;
-  RootedValue value(cx);
-  RootedSavedFrame exnStack(cx);
-  resultToCompletion(cx, ok, val, &resumeMode, &value, &exnStack);
+  Rooted<Completion> completion(cx, Completion::fromJSResult(cx, ok, val));
   ar.reset();
-  return wrapDebuggeeValue(cx, &value) &&
-         newCompletionValue(cx, resumeMode, value, exnStack, vp);
+  return completion.get().buildCompletionValue(cx, this, vp);
 }
 
 /*** Firing debugger hooks **************************************************/
 
 static bool CallMethodIfPresent(JSContext* cx, HandleObject obj,
                                 const char* name, size_t argc, Value* argv,
                                 MutableHandleValue rval) {
   rval.setUndefined();