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

Side by Side Diff: src/execution.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/arm64/code-stubs-arm64.cc ('k') | src/flag-definitions.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/execution.h" 5 #include "src/execution.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/isolate-inl.h" 9 #include "src/isolate-inl.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 ? isolate->factory()->js_construct_entry_code() 92 ? isolate->factory()->js_construct_entry_code()
93 : isolate->factory()->js_entry_code(); 93 : isolate->factory()->js_entry_code();
94 94
95 { 95 {
96 // Save and restore context around invocation and block the 96 // Save and restore context around invocation and block the
97 // allocation of handles without explicit handle scopes. 97 // allocation of handles without explicit handle scopes.
98 SaveContext save(isolate); 98 SaveContext save(isolate);
99 SealHandleScope shs(isolate); 99 SealHandleScope shs(isolate);
100 JSEntryFunction stub_entry = FUNCTION_CAST<JSEntryFunction>(code->entry()); 100 JSEntryFunction stub_entry = FUNCTION_CAST<JSEntryFunction>(code->entry());
101 101
102 if (FLAG_clear_exceptions_on_js_entry) isolate->clear_pending_exception();
103
102 // Call the function through the right JS entry stub. 104 // Call the function through the right JS entry stub.
103 Object* orig_func = *new_target; 105 Object* orig_func = *new_target;
104 Object* func = *target; 106 Object* func = *target;
105 Object* recv = *receiver; 107 Object* recv = *receiver;
106 Object*** argv = reinterpret_cast<Object***>(args); 108 Object*** argv = reinterpret_cast<Object***>(args);
107 if (FLAG_profile_deserialization && target->IsJSFunction()) { 109 if (FLAG_profile_deserialization && target->IsJSFunction()) {
108 PrintDeserializedCodeInfo(Handle<JSFunction>::cast(target)); 110 PrintDeserializedCodeInfo(Handle<JSFunction>::cast(target));
109 } 111 }
110 RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::JS_Execution); 112 RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::JS_Execution);
111 value = CALL_GENERATED_CODE(isolate, stub_entry, orig_func, func, recv, 113 value = CALL_GENERATED_CODE(isolate, stub_entry, orig_func, func, recv,
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 494
493 isolate_->counters()->stack_interrupts()->Increment(); 495 isolate_->counters()->stack_interrupts()->Increment();
494 isolate_->counters()->runtime_profiler_ticks()->Increment(); 496 isolate_->counters()->runtime_profiler_ticks()->Increment();
495 isolate_->runtime_profiler()->MarkCandidatesForOptimization(); 497 isolate_->runtime_profiler()->MarkCandidatesForOptimization();
496 498
497 return isolate_->heap()->undefined_value(); 499 return isolate_->heap()->undefined_value();
498 } 500 }
499 501
500 } // namespace internal 502 } // namespace internal
501 } // namespace v8 503 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698