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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2116563003: [DevTools] Report unhandled exceptions and promise rejections through Runtime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after ExceptionDetails change Created 4 years, 5 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 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 #include "core/html/imports/HTMLImportsController.h" 168 #include "core/html/imports/HTMLImportsController.h"
169 #include "core/html/parser/HTMLDocumentParser.h" 169 #include "core/html/parser/HTMLDocumentParser.h"
170 #include "core/html/parser/HTMLParserIdioms.h" 170 #include "core/html/parser/HTMLParserIdioms.h"
171 #include "core/html/parser/NestingLevelIncrementer.h" 171 #include "core/html/parser/NestingLevelIncrementer.h"
172 #include "core/html/parser/TextResourceDecoder.h" 172 #include "core/html/parser/TextResourceDecoder.h"
173 #include "core/input/EventHandler.h" 173 #include "core/input/EventHandler.h"
174 #include "core/inspector/ConsoleMessage.h" 174 #include "core/inspector/ConsoleMessage.h"
175 #include "core/inspector/InspectorInstrumentation.h" 175 #include "core/inspector/InspectorInstrumentation.h"
176 #include "core/inspector/InspectorTraceEvents.h" 176 #include "core/inspector/InspectorTraceEvents.h"
177 #include "core/inspector/InstanceCounters.h" 177 #include "core/inspector/InstanceCounters.h"
178 #include "core/inspector/MainThreadDebugger.h"
178 #include "core/layout/HitTestResult.h" 179 #include "core/layout/HitTestResult.h"
179 #include "core/layout/LayoutPart.h" 180 #include "core/layout/LayoutPart.h"
180 #include "core/layout/LayoutView.h" 181 #include "core/layout/LayoutView.h"
181 #include "core/layout/TextAutosizer.h" 182 #include "core/layout/TextAutosizer.h"
182 #include "core/layout/api/LayoutViewItem.h" 183 #include "core/layout/api/LayoutViewItem.h"
183 #include "core/layout/compositing/PaintLayerCompositor.h" 184 #include "core/layout/compositing/PaintLayerCompositor.h"
184 #include "core/loader/CookieJar.h" 185 #include "core/loader/CookieJar.h"
185 #include "core/loader/DocumentLoader.h" 186 #include "core/loader/DocumentLoader.h"
186 #include "core/loader/FrameFetchContext.h" 187 #include "core/loader/FrameFetchContext.h"
187 #include "core/loader/FrameLoader.h" 188 #include "core/loader/FrameLoader.h"
(...skipping 2695 matching lines...) Expand 10 before | Expand all | Expand 10 after
2883 DOMTimerCoordinator* Document::timers() 2884 DOMTimerCoordinator* Document::timers()
2884 { 2885 {
2885 return &m_timers; 2886 return &m_timers;
2886 } 2887 }
2887 2888
2888 EventTarget* Document::errorEventTarget() 2889 EventTarget* Document::errorEventTarget()
2889 { 2890 {
2890 return domWindow(); 2891 return domWindow();
2891 } 2892 }
2892 2893
2893 void Document::logExceptionToConsole(const String& errorMessage, std::unique_ptr <SourceLocation> location) 2894 void Document::exceptionThrown(const String& errorMessage, std::unique_ptr<Sourc eLocation> location)
2894 { 2895 {
2895 ConsoleMessage* consoleMessage = ConsoleMessage::create(JSMessageSource, Err orMessageLevel, errorMessage, std::move(location)); 2896 MainThreadDebugger::instance()->exceptionThrown(m_frame.get(), errorMessage, std::move(location));
2896 addConsoleMessage(consoleMessage);
2897 } 2897 }
2898 2898
2899 void Document::setURL(const KURL& url) 2899 void Document::setURL(const KURL& url)
2900 { 2900 {
2901 const KURL& newURL = url.isEmpty() ? blankURL() : url; 2901 const KURL& newURL = url.isEmpty() ? blankURL() : url;
2902 if (newURL == m_url) 2902 if (newURL == m_url)
2903 return; 2903 return;
2904 2904
2905 m_url = newURL; 2905 m_url = newURL;
2906 m_accessEntryFromURL = nullptr; 2906 m_accessEntryFromURL = nullptr;
(...skipping 3123 matching lines...) Expand 10 before | Expand all | Expand 10 after
6030 } 6030 }
6031 6031
6032 void showLiveDocumentInstances() 6032 void showLiveDocumentInstances()
6033 { 6033 {
6034 WeakDocumentSet& set = liveDocumentSet(); 6034 WeakDocumentSet& set = liveDocumentSet();
6035 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6035 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6036 for (Document* document : set) 6036 for (Document* document : set)
6037 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6037 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6038 } 6038 }
6039 #endif 6039 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/ExecutionContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698