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

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

Issue 2016123002: Remove ScriptCallStack. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2006893004
Patch Set: rebased 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 5207 matching lines...) Expand 10 before | Expand all | Expand 10 after
5218 void Document::addConsoleMessage(ConsoleMessage* consoleMessage) 5218 void Document::addConsoleMessage(ConsoleMessage* consoleMessage)
5219 { 5219 {
5220 if (!isContextThread()) { 5220 if (!isContextThread()) {
5221 m_taskRunner->postTask(BLINK_FROM_HERE, AddConsoleMessageTask::create(co nsoleMessage->source(), consoleMessage->level(), consoleMessage->message())); 5221 m_taskRunner->postTask(BLINK_FROM_HERE, AddConsoleMessageTask::create(co nsoleMessage->source(), consoleMessage->level(), consoleMessage->message()));
5222 return; 5222 return;
5223 } 5223 }
5224 5224
5225 if (!m_frame) 5225 if (!m_frame)
5226 return; 5226 return;
5227 5227
5228 if (!consoleMessage->messageId() && !consoleMessage->relatedMessageId() && c onsoleMessage->url().isNull() && !consoleMessage->lineNumber()) { 5228 if (!consoleMessage->messageId() && !consoleMessage->relatedMessageId() && c onsoleMessage->location()->isUnknown()) {
5229 // TODO(dgozman): capture correct location at call places instead.
5229 unsigned lineNumber = 0; 5230 unsigned lineNumber = 0;
5230 if (!isInDocumentWrite() && scriptableDocumentParser()) { 5231 if (!isInDocumentWrite() && scriptableDocumentParser()) {
5231 ScriptableDocumentParser* parser = scriptableDocumentParser(); 5232 ScriptableDocumentParser* parser = scriptableDocumentParser();
5232 if (parser->isParsingAtLineNumber()) 5233 if (parser->isParsingAtLineNumber())
5233 lineNumber = parser->lineNumber().oneBasedInt(); 5234 lineNumber = parser->lineNumber().oneBasedInt();
5234 } 5235 }
5235 consoleMessage = ConsoleMessage::create(consoleMessage->source(), consol eMessage->level(), consoleMessage->message(), url().getString(), lineNumber, 0, consoleMessage->stackTrace() ? consoleMessage->stackTrace()->clone() : nullptr, 0, consoleMessage->scriptArguments()); 5236 consoleMessage = ConsoleMessage::create(consoleMessage->source(), consol eMessage->level(), consoleMessage->message(), SourceLocation::create(url().getSt ring(), lineNumber, 0, nullptr), consoleMessage->scriptArguments());
5236 } 5237 }
5237 m_frame->console().addMessage(consoleMessage); 5238 m_frame->console().addMessage(consoleMessage);
5238 } 5239 }
5239 5240
5240 // FIXME(crbug.com/305497): This should be removed after ExecutionContext-LocalD OMWindow migration. 5241 // FIXME(crbug.com/305497): This should be removed after ExecutionContext-LocalD OMWindow migration.
5241 void Document::postTask(const WebTraceLocation& location, std::unique_ptr<Execut ionContextTask> task) 5242 void Document::postTask(const WebTraceLocation& location, std::unique_ptr<Execut ionContextTask> task)
5242 { 5243 {
5243 m_taskRunner->postTask(location, std::move(task)); 5244 m_taskRunner->postTask(location, std::move(task));
5244 } 5245 }
5245 5246
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
6033 #ifndef NDEBUG 6034 #ifndef NDEBUG
6034 using namespace blink; 6035 using namespace blink;
6035 void showLiveDocumentInstances() 6036 void showLiveDocumentInstances()
6036 { 6037 {
6037 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 6038 Document::WeakDocumentSet& set = Document::liveDocumentSet();
6038 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6039 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6039 for (Document* document : set) 6040 for (Document* document : set)
6040 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6041 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6041 } 6042 }
6042 #endif 6043 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/v8.gypi ('k') | third_party/WebKit/Source/core/events/EventTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698