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

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

Issue 1294583006: Clean up native context slots and add new ones. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/contexts.h ('k') | src/factory.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 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 "src/debug/debug.h" 5 #include "src/debug/debug.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after
1816 // Check whether the promise has been marked as having triggered a message. 1816 // Check whether the promise has been marked as having triggered a message.
1817 Handle<Symbol> key = isolate_->factory()->promise_debug_marker_symbol(); 1817 Handle<Symbol> key = isolate_->factory()->promise_debug_marker_symbol();
1818 if (JSReceiver::GetDataProperty(promise, key)->IsUndefined()) { 1818 if (JSReceiver::GetDataProperty(promise, key)->IsUndefined()) {
1819 OnException(value, promise); 1819 OnException(value, promise);
1820 } 1820 }
1821 } 1821 }
1822 1822
1823 1823
1824 MaybeHandle<Object> Debug::PromiseHasUserDefinedRejectHandler( 1824 MaybeHandle<Object> Debug::PromiseHasUserDefinedRejectHandler(
1825 Handle<JSObject> promise) { 1825 Handle<JSObject> promise) {
1826 Handle<JSFunction> fun = Handle<JSFunction>::cast( 1826 Handle<JSFunction> fun = isolate_->promise_has_user_defined_reject_handler();
1827 JSReceiver::GetDataProperty(isolate_->js_builtins_object(),
1828 isolate_->factory()->NewStringFromStaticChars(
1829 "$promiseHasUserDefinedRejectHandler")));
1830 return Execution::Call(isolate_, fun, promise, 0, NULL); 1827 return Execution::Call(isolate_, fun, promise, 0, NULL);
1831 } 1828 }
1832 1829
1833 1830
1834 void Debug::OnException(Handle<Object> exception, Handle<Object> promise) { 1831 void Debug::OnException(Handle<Object> exception, Handle<Object> promise) {
1835 // In our prediction, try-finally is not considered to catch. 1832 // In our prediction, try-finally is not considered to catch.
1836 Isolate::CatchType catch_type = isolate_->PredictExceptionCatcher(); 1833 Isolate::CatchType catch_type = isolate_->PredictExceptionCatcher();
1837 bool uncaught = (catch_type == Isolate::NOT_CAUGHT); 1834 bool uncaught = (catch_type == Isolate::NOT_CAUGHT);
1838 if (promise->IsJSObject()) { 1835 if (promise->IsJSObject()) {
1839 Handle<JSObject> jspromise = Handle<JSObject>::cast(promise); 1836 Handle<JSObject> jspromise = Handle<JSObject>::cast(promise);
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
2679 } 2676 }
2680 2677
2681 2678
2682 void LockingCommandMessageQueue::Clear() { 2679 void LockingCommandMessageQueue::Clear() {
2683 base::LockGuard<base::Mutex> lock_guard(&mutex_); 2680 base::LockGuard<base::Mutex> lock_guard(&mutex_);
2684 queue_.Clear(); 2681 queue_.Clear();
2685 } 2682 }
2686 2683
2687 } // namespace internal 2684 } // namespace internal
2688 } // namespace v8 2685 } // namespace v8
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698