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

Side by Side Diff: src/messages.cc

Issue 2208663002: Clear exceptions in Invoke instead of JSEntryStub (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@port-no-sideeffect-to-string
Patch Set: Rebase Created 4 years, 4 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
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/mips/code-stubs-mips.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 "src/messages.h" 5 #include "src/messages.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/execution.h" 10 #include "src/execution.h"
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 return msg; 877 return msg;
878 } 878 }
879 879
880 } // namespace 880 } // namespace
881 881
882 // static 882 // static
883 MaybeHandle<Object> ErrorUtils::MakeGenericError( 883 MaybeHandle<Object> ErrorUtils::MakeGenericError(
884 Isolate* isolate, Handle<JSFunction> constructor, int template_index, 884 Isolate* isolate, Handle<JSFunction> constructor, int template_index,
885 Handle<Object> arg0, Handle<Object> arg1, Handle<Object> arg2, 885 Handle<Object> arg0, Handle<Object> arg1, Handle<Object> arg2,
886 FrameSkipMode mode) { 886 FrameSkipMode mode) {
887 // This function used to be implemented in JavaScript, and JSEntryStub clears 887 if (FLAG_clear_exceptions_on_js_entry) {
888 // any pending exceptions - so whenever we'd call this from C++, pending 888 // This function used to be implemented in JavaScript, and JSEntryStub
889 // exceptions would be cleared. Preserve this behavior. 889 // clears
890 isolate->clear_pending_exception(); 890 // any pending exceptions - so whenever we'd call this from C++, pending
891 // exceptions would be cleared. Preserve this behavior.
892 isolate->clear_pending_exception();
893 }
891 894
892 DCHECK(mode != SKIP_UNTIL_SEEN); 895 DCHECK(mode != SKIP_UNTIL_SEEN);
893 896
894 Handle<Object> no_caller; 897 Handle<Object> no_caller;
895 Handle<String> msg = FormatMessage(isolate, template_index, arg0, arg1, arg2); 898 Handle<String> msg = FormatMessage(isolate, template_index, arg0, arg1, arg2);
896 return ErrorUtils::Construct(isolate, constructor, constructor, msg, mode, 899 return ErrorUtils::Construct(isolate, constructor, constructor, msg, mode,
897 no_caller, false); 900 no_caller, false);
898 } 901 }
899 902
900 #define SET_CALLSITE_PROPERTY(target, key, value) \ 903 #define SET_CALLSITE_PROPERTY(target, key, value) \
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 builder.AppendCString(" ("); 1180 builder.AppendCString(" (");
1178 RETURN_ON_EXCEPTION( 1181 RETURN_ON_EXCEPTION(
1179 isolate, AppendFileLocation(isolate, recv, &call_site, &builder), String); 1182 isolate, AppendFileLocation(isolate, recv, &call_site, &builder), String);
1180 builder.AppendCString(")"); 1183 builder.AppendCString(")");
1181 1184
1182 RETURN_RESULT(isolate, builder.Finish(), String); 1185 RETURN_RESULT(isolate, builder.Finish(), String);
1183 } 1186 }
1184 1187
1185 } // namespace internal 1188 } // namespace internal
1186 } // namespace v8 1189 } // namespace v8
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698