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

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: tests pass 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 2696 matching lines...) Expand 10 before | Expand all | Expand 10 after
2884 DOMTimerCoordinator* Document::timers() 2885 DOMTimerCoordinator* Document::timers()
2885 { 2886 {
2886 return &m_timers; 2887 return &m_timers;
2887 } 2888 }
2888 2889
2889 EventTarget* Document::errorEventTarget() 2890 EventTarget* Document::errorEventTarget()
2890 { 2891 {
2891 return domWindow(); 2892 return domWindow();
2892 } 2893 }
2893 2894
2894 void Document::logExceptionToConsole(const String& errorMessage, std::unique_ptr <SourceLocation> location) 2895 void Document::logExceptionToConsole(const String& errorMessage, std::unique_ptr <SourceLocation> location)
pfeldman 2016/07/07 01:12:17 exeptionThrown
dgozman 2016/07/08 18:56:41 Done.
2895 { 2896 {
2896 ConsoleMessage* consoleMessage = ConsoleMessage::create(JSMessageSource, Err orMessageLevel, errorMessage, std::move(location)); 2897 MainThreadDebugger::instance()->exceptionUnhandled(m_frame.get(), errorMessa ge, std::move(location));
2897 addConsoleMessage(consoleMessage);
2898 } 2898 }
2899 2899
2900 void Document::setURL(const KURL& url) 2900 void Document::setURL(const KURL& url)
2901 { 2901 {
2902 const KURL& newURL = url.isEmpty() ? blankURL() : url; 2902 const KURL& newURL = url.isEmpty() ? blankURL() : url;
2903 if (newURL == m_url) 2903 if (newURL == m_url)
2904 return; 2904 return;
2905 2905
2906 m_url = newURL; 2906 m_url = newURL;
2907 m_accessEntryFromURL = nullptr; 2907 m_accessEntryFromURL = nullptr;
(...skipping 3122 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

Powered by Google App Engine
This is Rietveld 408576698