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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2035263002: Extract SourceLocation for ConsoleMessages on call sites. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2037593004
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) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
8 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 19 matching lines...) Expand all
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35 #include "core/loader/FrameLoader.h" 35 #include "core/loader/FrameLoader.h"
36 36
37 #include "bindings/core/v8/DOMWrapperWorld.h" 37 #include "bindings/core/v8/DOMWrapperWorld.h"
38 #include "bindings/core/v8/ScriptController.h" 38 #include "bindings/core/v8/ScriptController.h"
39 #include "bindings/core/v8/SerializedScriptValue.h" 39 #include "bindings/core/v8/SerializedScriptValue.h"
40 #include "bindings/core/v8/SourceLocation.h"
40 #include "core/HTMLNames.h" 41 #include "core/HTMLNames.h"
41 #include "core/dom/Document.h" 42 #include "core/dom/Document.h"
42 #include "core/dom/Element.h" 43 #include "core/dom/Element.h"
43 #include "core/dom/ViewportDescription.h" 44 #include "core/dom/ViewportDescription.h"
44 #include "core/editing/Editor.h" 45 #include "core/editing/Editor.h"
45 #include "core/editing/commands/UndoStack.h" 46 #include "core/editing/commands/UndoStack.h"
46 #include "core/events/GestureEvent.h" 47 #include "core/events/GestureEvent.h"
47 #include "core/events/KeyboardEvent.h" 48 #include "core/events/KeyboardEvent.h"
48 #include "core/events/MouseEvent.h" 49 #include "core/events/MouseEvent.h"
49 #include "core/events/PageTransitionEvent.h" 50 #include "core/events/PageTransitionEvent.h"
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 CString encodedSrcdoc = srcdoc.utf8(); 1002 CString encodedSrcdoc = srcdoc.utf8();
1002 return SubstituteData(SharedBuffer::create(encodedSrcdoc.data(), encodedSrcd oc.length()), "text/html", "UTF-8", KURL()); 1003 return SubstituteData(SharedBuffer::create(encodedSrcdoc.data(), encodedSrcd oc.length()), "text/html", "UTF-8", KURL());
1003 } 1004 }
1004 1005
1005 void FrameLoader::reportLocalLoadFailed(LocalFrame* frame, const String& url) 1006 void FrameLoader::reportLocalLoadFailed(LocalFrame* frame, const String& url)
1006 { 1007 {
1007 ASSERT(!url.isEmpty()); 1008 ASSERT(!url.isEmpty());
1008 if (!frame) 1009 if (!frame)
1009 return; 1010 return;
1010 1011
1011 frame->document()->addConsoleMessage(ConsoleMessage::create(SecurityMessageS ource, ErrorMessageLevel, "Not allowed to load local resource: " + url)); 1012 frame->document()->addConsoleMessage(ConsoleMessage::create(SecurityMessageS ource, ErrorMessageLevel, "Not allowed to load local resource: " + url, SourceLo cation::capture(frame->document())));
1012 } 1013 }
1013 1014
1014 void FrameLoader::stopAllLoaders() 1015 void FrameLoader::stopAllLoaders()
1015 { 1016 {
1016 if (m_frame->document()->pageDismissalEventBeingDispatched() != Document::No Dismissal) 1017 if (m_frame->document()->pageDismissalEventBeingDispatched() != Document::No Dismissal)
1017 return; 1018 return;
1018 1019
1019 // If this method is called from within this method, infinite recursion can occur (3442218). Avoid this. 1020 // If this method is called from within this method, infinite recursion can occur (3442218). Avoid this.
1020 if (m_inStopAllLoaders) 1021 if (m_inStopAllLoaders)
1021 return; 1022 return;
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
1624 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String()); 1625 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String());
1625 return tracedValue; 1626 return tracedValue;
1626 } 1627 }
1627 1628
1628 inline void FrameLoader::takeObjectSnapshot() const 1629 inline void FrameLoader::takeObjectSnapshot() const
1629 { 1630 {
1630 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value()); 1631 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value());
1631 } 1632 }
1632 1633
1633 } // namespace blink 1634 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameFetchContext.cpp ('k') | third_party/WebKit/Source/core/loader/HttpEquiv.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698