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

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

Issue 2010603002: Use SourceLocation when reporting runtime exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2004243002
Patch Set: Created 4 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 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 15 matching lines...) Expand all
26 */ 26 */
27 27
28 #include "core/dom/Document.h" 28 #include "core/dom/Document.h"
29 29
30 #include "bindings/core/v8/DOMDataStore.h" 30 #include "bindings/core/v8/DOMDataStore.h"
31 #include "bindings/core/v8/ExceptionMessages.h" 31 #include "bindings/core/v8/ExceptionMessages.h"
32 #include "bindings/core/v8/ExceptionState.h" 32 #include "bindings/core/v8/ExceptionState.h"
33 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 33 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
34 #include "bindings/core/v8/HTMLScriptElementOrSVGScriptElement.h" 34 #include "bindings/core/v8/HTMLScriptElementOrSVGScriptElement.h"
35 #include "bindings/core/v8/Microtask.h" 35 #include "bindings/core/v8/Microtask.h"
36 #include "bindings/core/v8/ScriptCallStack.h"
37 #include "bindings/core/v8/ScriptController.h" 36 #include "bindings/core/v8/ScriptController.h"
37 #include "bindings/core/v8/SourceLocation.h"
38 #include "bindings/core/v8/V0CustomElementConstructorBuilder.h" 38 #include "bindings/core/v8/V0CustomElementConstructorBuilder.h"
39 #include "bindings/core/v8/V8DOMWrapper.h" 39 #include "bindings/core/v8/V8DOMWrapper.h"
40 #include "bindings/core/v8/V8PerIsolateData.h" 40 #include "bindings/core/v8/V8PerIsolateData.h"
41 #include "bindings/core/v8/WindowProxy.h" 41 #include "bindings/core/v8/WindowProxy.h"
42 #include "core/HTMLElementFactory.h" 42 #include "core/HTMLElementFactory.h"
43 #include "core/HTMLNames.h" 43 #include "core/HTMLNames.h"
44 #include "core/SVGElementFactory.h" 44 #include "core/SVGElementFactory.h"
45 #include "core/SVGNames.h" 45 #include "core/SVGNames.h"
46 #include "core/XMLNSNames.h" 46 #include "core/XMLNSNames.h"
47 #include "core/XMLNames.h" 47 #include "core/XMLNames.h"
(...skipping 2867 matching lines...) Expand 10 before | Expand all | Expand 10 after
2915 DOMTimerCoordinator* Document::timers() 2915 DOMTimerCoordinator* Document::timers()
2916 { 2916 {
2917 return &m_timers; 2917 return &m_timers;
2918 } 2918 }
2919 2919
2920 EventTarget* Document::errorEventTarget() 2920 EventTarget* Document::errorEventTarget()
2921 { 2921 {
2922 return domWindow(); 2922 return domWindow();
2923 } 2923 }
2924 2924
2925 void Document::logExceptionToConsole(const String& errorMessage, int scriptId, c onst String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallS tack> callStack) 2925 void Document::logExceptionToConsole(const String& errorMessage, PassOwnPtr<Sour ceLocation> location)
2926 { 2926 {
2927 ConsoleMessage* consoleMessage = ConsoleMessage::create(JSMessageSource, Err orMessageLevel, errorMessage, sourceURL, lineNumber, columnNumber, callStack, sc riptId); 2927 ConsoleMessage* consoleMessage = ConsoleMessage::create(JSMessageSource, Err orMessageLevel, errorMessage, std::move(location));
2928 addConsoleMessage(consoleMessage); 2928 addConsoleMessage(consoleMessage);
2929 } 2929 }
2930 2930
2931 void Document::setURL(const KURL& url) 2931 void Document::setURL(const KURL& url)
2932 { 2932 {
2933 const KURL& newURL = url.isEmpty() ? blankURL() : url; 2933 const KURL& newURL = url.isEmpty() ? blankURL() : url;
2934 if (newURL == m_url) 2934 if (newURL == m_url)
2935 return; 2935 return;
2936 2936
2937 m_url = newURL; 2937 m_url = newURL;
(...skipping 3077 matching lines...) Expand 10 before | Expand all | Expand 10 after
6015 #ifndef NDEBUG 6015 #ifndef NDEBUG
6016 using namespace blink; 6016 using namespace blink;
6017 void showLiveDocumentInstances() 6017 void showLiveDocumentInstances()
6018 { 6018 {
6019 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 6019 Document::WeakDocumentSet& set = Document::liveDocumentSet();
6020 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6020 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6021 for (Document* document : set) 6021 for (Document* document : set)
6022 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6022 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6023 } 6023 }
6024 #endif 6024 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698