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

Unified Diff: runtime/vm/code_generator.cc

Issue 1168933002: Fixes crashes in VM isolate shutdown. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add asserts Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/compiler.cc » ('j') | runtime/vm/debugger_api_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index 4485c5805227d4a233ff785db0b9a708b42021e8..1120b5f61c7101959b8249346223cf56728b6ad0 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -702,6 +702,7 @@ DEFINE_RUNTIME_ENTRY(BreakpointRuntimeHandler, 0) {
DartFrameIterator iterator;
StackFrame* caller_frame = iterator.NextFrame();
ASSERT(caller_frame != NULL);
+ ASSERT(isolate->debugger() != NULL);
uword orig_stub =
isolate->debugger()->GetPatchedStubAddress(caller_frame->pc());
isolate->debugger()->SignalBpReached();
@@ -1049,6 +1050,7 @@ DEFINE_RUNTIME_ENTRY(InvokeClosureNoSuchMethod, 3) {
static bool CanOptimizeFunction(const Function& function, Isolate* isolate) {
+ ASSERT(isolate->debugger() != NULL);
const intptr_t kLowInvocationCount = -100000000;
if (isolate->debugger()->IsStepping() ||
isolate->debugger()->HasBreakpoint(function)) {
@@ -1176,6 +1178,7 @@ DEFINE_RUNTIME_ENTRY(StackOverflow, 0) {
DeoptimizeFunctionsOnStack();
}
if (do_stacktrace) {
+ ASSERT(isolate->debugger() != NULL);
String& var_name = String::Handle();
Instance& var_value = Instance::Handle();
DebuggerStackTrace* stack = isolate->debugger()->StackTrace();
« no previous file with comments | « no previous file | runtime/vm/compiler.cc » ('j') | runtime/vm/debugger_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698