Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/runtime.cc

Issue 262533009: Revert "Trigger exception debug event for promises at the throw site." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/runtime.h ('k') | test/mjsunit/es6/debug-promises-caught-all.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <limits> 6 #include <limits>
7 7
8 #include "v8.h" 8 #include "v8.h"
9 9
10 #include "accessors.h" 10 #include "accessors.h"
(...skipping 5639 matching lines...) Expand 10 before | Expand all | Expand 10 after
5650 HandleScope scope(isolate); 5650 HandleScope scope(isolate);
5651 // When leaving the callback, step out has been activated, but not performed 5651 // When leaving the callback, step out has been activated, but not performed
5652 // if we do not leave the builtin. To be able to step into the callback 5652 // if we do not leave the builtin. To be able to step into the callback
5653 // again, we need to clear the step out at this point. 5653 // again, we need to clear the step out at this point.
5654 debug->ClearStepOut(); 5654 debug->ClearStepOut();
5655 debug->FloodWithOneShot(callback); 5655 debug->FloodWithOneShot(callback);
5656 return isolate->heap()->undefined_value(); 5656 return isolate->heap()->undefined_value();
5657 } 5657 }
5658 5658
5659 5659
5660 // The argument is a closure that is kept until the epilogue is called. 5660 // Notify the debugger if an expcetion in a promise is not caught (yet).
5661 // On exception, the closure is called, which returns the promise if the 5661 RUNTIME_FUNCTION(Runtime_DebugPendingExceptionInPromise) {
5662 // exception is considered uncaught, or undefined otherwise. 5662 ASSERT(args.length() == 2);
5663 RUNTIME_FUNCTION(Runtime_DebugPromiseHandlePrologue) {
5664 ASSERT(args.length() == 1);
5665 HandleScope scope(isolate); 5663 HandleScope scope(isolate);
5666 CONVERT_ARG_HANDLE_CHECKED(JSFunction, promise_getter, 0); 5664 CONVERT_ARG_HANDLE_CHECKED(Object, exception, 0);
5667 isolate->debug()->PromiseHandlePrologue(promise_getter); 5665 CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 1);
5666 isolate->debugger()->OnException(exception, true, promise);
5668 return isolate->heap()->undefined_value(); 5667 return isolate->heap()->undefined_value();
5669 } 5668 }
5670 5669
5671
5672 RUNTIME_FUNCTION(Runtime_DebugPromiseHandleEpilogue) {
5673 ASSERT(args.length() == 0);
5674 SealHandleScope shs(isolate);
5675 isolate->debug()->PromiseHandleEpilogue();
5676 return isolate->heap()->undefined_value();
5677 }
5678
5679 5670
5680 // Set a local property, even if it is READ_ONLY. If the property does not 5671 // Set a local property, even if it is READ_ONLY. If the property does not
5681 // exist, it will be added with attributes NONE. 5672 // exist, it will be added with attributes NONE.
5682 RUNTIME_FUNCTION(Runtime_IgnoreAttributesAndSetProperty) { 5673 RUNTIME_FUNCTION(Runtime_IgnoreAttributesAndSetProperty) {
5683 HandleScope scope(isolate); 5674 HandleScope scope(isolate);
5684 RUNTIME_ASSERT(args.length() == 3 || args.length() == 4); 5675 RUNTIME_ASSERT(args.length() == 3 || args.length() == 4);
5685 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); 5676 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
5686 CONVERT_ARG_HANDLE_CHECKED(Name, name, 1); 5677 CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
5687 CONVERT_ARG_HANDLE_CHECKED(Object, value, 2); 5678 CONVERT_ARG_HANDLE_CHECKED(Object, value, 2);
5688 // Compute attributes. 5679 // Compute attributes.
(...skipping 9499 matching lines...) Expand 10 before | Expand all | Expand 10 after
15188 } 15179 }
15189 return NULL; 15180 return NULL;
15190 } 15181 }
15191 15182
15192 15183
15193 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15184 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15194 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15185 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15195 } 15186 }
15196 15187
15197 } } // namespace v8::internal 15188 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | test/mjsunit/es6/debug-promises-caught-all.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698