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

Side by Side Diff: src/runtime/runtime-debug.cc

Issue 1157273002: Reland "Fixed a couple of failing DCHECK(has_pending_exception())." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes Created 5 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
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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/debug.h" 10 #include "src/debug.h"
(...skipping 2730 matching lines...) Expand 10 before | Expand all | Expand 10 after
2741 } 2741 }
2742 2742
2743 2743
2744 RUNTIME_FUNCTION(Runtime_DebugGetLoadedScripts) { 2744 RUNTIME_FUNCTION(Runtime_DebugGetLoadedScripts) {
2745 HandleScope scope(isolate); 2745 HandleScope scope(isolate);
2746 DCHECK(args.length() == 0); 2746 DCHECK(args.length() == 0);
2747 2747
2748 Handle<FixedArray> instances; 2748 Handle<FixedArray> instances;
2749 { 2749 {
2750 DebugScope debug_scope(isolate->debug()); 2750 DebugScope debug_scope(isolate->debug());
2751 if (debug_scope.failed()) {
2752 DCHECK(isolate->has_pending_exception());
2753 return isolate->heap()->exception();
2754 }
2751 // Fill the script objects. 2755 // Fill the script objects.
2752 instances = isolate->debug()->GetLoadedScripts(); 2756 instances = isolate->debug()->GetLoadedScripts();
2753 } 2757 }
2754 2758
2755 // Convert the script objects to proper JS objects. 2759 // Convert the script objects to proper JS objects.
2756 for (int i = 0; i < instances->length(); i++) { 2760 for (int i = 0; i < instances->length(); i++) {
2757 Handle<Script> script = Handle<Script>(Script::cast(instances->get(i))); 2761 Handle<Script> script = Handle<Script>(Script::cast(instances->get(i)));
2758 // Get the script wrapper in a local handle before calling GetScriptWrapper, 2762 // Get the script wrapper in a local handle before calling GetScriptWrapper,
2759 // because using 2763 // because using
2760 // instances->set(i, *GetScriptWrapper(script)) 2764 // instances->set(i, *GetScriptWrapper(script))
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
3211 return Smi::FromInt(isolate->debug()->is_active()); 3215 return Smi::FromInt(isolate->debug()->is_active());
3212 } 3216 }
3213 3217
3214 3218
3215 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { 3219 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) {
3216 UNIMPLEMENTED(); 3220 UNIMPLEMENTED();
3217 return NULL; 3221 return NULL;
3218 } 3222 }
3219 } // namespace internal 3223 } // namespace internal
3220 } // namespace v8 3224 } // namespace v8
OLDNEW
« src/isolate.cc ('K') | « src/isolate.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698