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

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: test fixes 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 2865 matching lines...) Expand 10 before | Expand all | Expand 10 after
2913 DOMTimerCoordinator* Document::timers() 2913 DOMTimerCoordinator* Document::timers()
2914 { 2914 {
2915 return &m_timers; 2915 return &m_timers;
2916 } 2916 }
2917 2917
2918 EventTarget* Document::errorEventTarget() 2918 EventTarget* Document::errorEventTarget()
2919 { 2919 {
2920 return domWindow(); 2920 return domWindow();
2921 } 2921 }
2922 2922
2923 void Document::logExceptionToConsole(const String& errorMessage, int scriptId, c onst String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallS tack> callStack) 2923 void Document::logExceptionToConsole(const String& errorMessage, PassOwnPtr<Sour ceLocation> location)
2924 { 2924 {
2925 ConsoleMessage* consoleMessage = ConsoleMessage::create(JSMessageSource, Err orMessageLevel, errorMessage, sourceURL, lineNumber, columnNumber, callStack, sc riptId); 2925 ConsoleMessage* consoleMessage = ConsoleMessage::create(JSMessageSource, Err orMessageLevel, errorMessage, std::move(location));
2926 addConsoleMessage(consoleMessage); 2926 addConsoleMessage(consoleMessage);
2927 } 2927 }
2928 2928
2929 void Document::setURL(const KURL& url) 2929 void Document::setURL(const KURL& url)
2930 { 2930 {
2931 const KURL& newURL = url.isEmpty() ? blankURL() : url; 2931 const KURL& newURL = url.isEmpty() ? blankURL() : url;
2932 if (newURL == m_url) 2932 if (newURL == m_url)
2933 return; 2933 return;
2934 2934
2935 m_url = newURL; 2935 m_url = newURL;
(...skipping 3077 matching lines...) Expand 10 before | Expand all | Expand 10 after
6013 #ifndef NDEBUG 6013 #ifndef NDEBUG
6014 using namespace blink; 6014 using namespace blink;
6015 void showLiveDocumentInstances() 6015 void showLiveDocumentInstances()
6016 { 6016 {
6017 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 6017 Document::WeakDocumentSet& set = Document::liveDocumentSet();
6018 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6018 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6019 for (Document* document : set) 6019 for (Document* document : set)
6020 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6020 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6021 } 6021 }
6022 #endif 6022 #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