OLD | NEW |
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 2608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2619 RefPtrWillBeRawPtr<BeforeUnloadEvent> beforeUnloadEvent = BeforeUnloadEvent:
:create(); | 2619 RefPtrWillBeRawPtr<BeforeUnloadEvent> beforeUnloadEvent = BeforeUnloadEvent:
:create(); |
2620 m_loadEventProgress = BeforeUnloadEventInProgress; | 2620 m_loadEventProgress = BeforeUnloadEventInProgress; |
2621 m_domWindow->dispatchEvent(beforeUnloadEvent.get(), this); | 2621 m_domWindow->dispatchEvent(beforeUnloadEvent.get(), this); |
2622 m_loadEventProgress = BeforeUnloadEventCompleted; | 2622 m_loadEventProgress = BeforeUnloadEventCompleted; |
2623 if (!beforeUnloadEvent->defaultPrevented()) | 2623 if (!beforeUnloadEvent->defaultPrevented()) |
2624 defaultEventHandler(beforeUnloadEvent.get()); | 2624 defaultEventHandler(beforeUnloadEvent.get()); |
2625 if (beforeUnloadEvent->returnValue().isNull()) | 2625 if (beforeUnloadEvent->returnValue().isNull()) |
2626 return true; | 2626 return true; |
2627 | 2627 |
2628 if (didAllowNavigation) { | 2628 if (didAllowNavigation) { |
2629 addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Blocked attempt t
o show multiple 'beforeunload' confirmation panels for a single navigation."); | 2629 addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLe
vel, "Blocked attempt to show multiple 'beforeunload' confirmation panels for a
single navigation.")); |
2630 return true; | 2630 return true; |
2631 } | 2631 } |
2632 | 2632 |
2633 String text = beforeUnloadEvent->returnValue(); | 2633 String text = beforeUnloadEvent->returnValue(); |
2634 if (chrome.runBeforeUnloadConfirmPanel(text, m_frame)) { | 2634 if (chrome.runBeforeUnloadConfirmPanel(text, m_frame)) { |
2635 didAllowNavigation = true; | 2635 didAllowNavigation = true; |
2636 return true; | 2636 return true; |
2637 } | 2637 } |
2638 return false; | 2638 return false; |
2639 } | 2639 } |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2738 | 2738 |
2739 m_writeRecursionIsTooDeep = (m_writeRecursionDepth > 1) && m_writeRecursionI
sTooDeep; | 2739 m_writeRecursionIsTooDeep = (m_writeRecursionDepth > 1) && m_writeRecursionI
sTooDeep; |
2740 m_writeRecursionIsTooDeep = (m_writeRecursionDepth > cMaxWriteRecursionDepth
) || m_writeRecursionIsTooDeep; | 2740 m_writeRecursionIsTooDeep = (m_writeRecursionDepth > cMaxWriteRecursionDepth
) || m_writeRecursionIsTooDeep; |
2741 | 2741 |
2742 if (m_writeRecursionIsTooDeep) | 2742 if (m_writeRecursionIsTooDeep) |
2743 return; | 2743 return; |
2744 | 2744 |
2745 bool hasInsertionPoint = m_parser && m_parser->hasInsertionPoint(); | 2745 bool hasInsertionPoint = m_parser && m_parser->hasInsertionPoint(); |
2746 | 2746 |
2747 if (!hasInsertionPoint && m_ignoreDestructiveWriteCount) { | 2747 if (!hasInsertionPoint && m_ignoreDestructiveWriteCount) { |
2748 addConsoleMessage(JSMessageSource, WarningMessageLevel, ExceptionMessage
s::failedToExecute("write", "Document", "It isn't possible to write into a docum
ent from an asynchronously-loaded external script unless it is explicitly opened
.")); | 2748 addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessage
Level, ExceptionMessages::failedToExecute("write", "Document", "It isn't possibl
e to write into a document from an asynchronously-loaded external script unless
it is explicitly opened."))); |
2749 return; | 2749 return; |
2750 } | 2750 } |
2751 | 2751 |
2752 if (!hasInsertionPoint) | 2752 if (!hasInsertionPoint) |
2753 open(ownerDocument); | 2753 open(ownerDocument); |
2754 | 2754 |
2755 ASSERT(m_parser); | 2755 ASSERT(m_parser); |
2756 m_parser->insert(text); | 2756 m_parser->insert(text); |
2757 } | 2757 } |
2758 | 2758 |
(...skipping 28 matching lines...) Expand all Loading... |
2787 return p->timerAlignmentInterval(); | 2787 return p->timerAlignmentInterval(); |
2788 } | 2788 } |
2789 | 2789 |
2790 EventTarget* Document::errorEventTarget() | 2790 EventTarget* Document::errorEventTarget() |
2791 { | 2791 { |
2792 return domWindow(); | 2792 return domWindow(); |
2793 } | 2793 } |
2794 | 2794 |
2795 void Document::logExceptionToConsole(const String& errorMessage, const String& s
ourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptCallSta
ck> callStack) | 2795 void Document::logExceptionToConsole(const String& errorMessage, const String& s
ourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptCallSta
ck> callStack) |
2796 { | 2796 { |
2797 internalAddMessage(JSMessageSource, ErrorMessageLevel, errorMessage, sourceU
RL, lineNumber, callStack, 0); | 2797 RefPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(JSMessageSour
ce, ErrorMessageLevel, errorMessage, sourceURL, lineNumber); |
| 2798 consoleMessage->setCallStack(callStack); |
| 2799 addMessage(consoleMessage.release()); |
2798 } | 2800 } |
2799 | 2801 |
2800 void Document::setURL(const KURL& url) | 2802 void Document::setURL(const KURL& url) |
2801 { | 2803 { |
2802 const KURL& newURL = url.isEmpty() ? blankURL() : url; | 2804 const KURL& newURL = url.isEmpty() ? blankURL() : url; |
2803 if (newURL == m_url) | 2805 if (newURL == m_url) |
2804 return; | 2806 return; |
2805 | 2807 |
2806 m_url = newURL; | 2808 m_url = newURL; |
2807 updateBaseURL(); | 2809 updateBaseURL(); |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3082 String refreshURL; | 3084 String refreshURL; |
3083 if (!parseHTTPRefresh(content, httpRefreshType == HttpRefreshFromMetaTag, de
lay, refreshURL)) | 3085 if (!parseHTTPRefresh(content, httpRefreshType == HttpRefreshFromMetaTag, de
lay, refreshURL)) |
3084 return; | 3086 return; |
3085 if (refreshURL.isEmpty()) | 3087 if (refreshURL.isEmpty()) |
3086 refreshURL = url().string(); | 3088 refreshURL = url().string(); |
3087 else | 3089 else |
3088 refreshURL = completeURL(refreshURL).string(); | 3090 refreshURL = completeURL(refreshURL).string(); |
3089 | 3091 |
3090 if (protocolIsJavaScript(refreshURL)) { | 3092 if (protocolIsJavaScript(refreshURL)) { |
3091 String message = "Refused to refresh " + m_url.elidedString() + " to a j
avascript: URL"; | 3093 String message = "Refused to refresh " + m_url.elidedString() + " to a j
avascript: URL"; |
3092 addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message); | 3094 addConsoleMessage(ConsoleMessage::create(SecurityMessageSource, ErrorMes
sageLevel, message)); |
3093 return; | 3095 return; |
3094 } | 3096 } |
3095 | 3097 |
3096 if (httpRefreshType == HttpRefreshFromMetaTag && isSandboxed(SandboxAutomati
cFeatures)) { | 3098 if (httpRefreshType == HttpRefreshFromMetaTag && isSandboxed(SandboxAutomati
cFeatures)) { |
3097 String message = "Refused to execute the redirect specified via '<meta h
ttp-equiv='refresh' content='...'>'. The document is sandboxed, and the 'allow-s
cripts' keyword is not set."; | 3099 String message = "Refused to execute the redirect specified via '<meta h
ttp-equiv='refresh' content='...'>'. The document is sandboxed, and the 'allow-s
cripts' keyword is not set."; |
3098 addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message); | 3100 addConsoleMessage(ConsoleMessage::create(SecurityMessageSource, ErrorMes
sageLevel, message)); |
3099 return; | 3101 return; |
3100 } | 3102 } |
3101 m_frame->navigationScheduler().scheduleRedirect(delay, refreshURL); | 3103 m_frame->navigationScheduler().scheduleRedirect(delay, refreshURL); |
3102 } | 3104 } |
3103 | 3105 |
3104 void Document::processHttpEquivSetCookie(const AtomicString& content) | 3106 void Document::processHttpEquivSetCookie(const AtomicString& content) |
3105 { | 3107 { |
3106 // FIXME: make setCookie work on XML documents too; e.g. in case of <html:me
ta .....> | 3108 // FIXME: make setCookie work on XML documents too; e.g. in case of <html:me
ta .....> |
3107 if (!isHTMLDocument()) | 3109 if (!isHTMLDocument()) |
3108 return; | 3110 return; |
(...skipping 10 matching lines...) Expand all Loading... |
3119 | 3121 |
3120 FrameLoader& frameLoader = frame->loader(); | 3122 FrameLoader& frameLoader = frame->loader(); |
3121 unsigned long requestIdentifier = loader()->mainResourceIdentifier(); | 3123 unsigned long requestIdentifier = loader()->mainResourceIdentifier(); |
3122 if (frameLoader.shouldInterruptLoadForXFrameOptions(content, url(), requestI
dentifier)) { | 3124 if (frameLoader.shouldInterruptLoadForXFrameOptions(content, url(), requestI
dentifier)) { |
3123 String message = "Refused to display '" + url().elidedString() + "' in a
frame because it set 'X-Frame-Options' to '" + content + "'."; | 3125 String message = "Refused to display '" + url().elidedString() + "' in a
frame because it set 'X-Frame-Options' to '" + content + "'."; |
3124 frameLoader.stopAllLoaders(); | 3126 frameLoader.stopAllLoaders(); |
3125 // Stopping the loader isn't enough, as we're already parsing the docume
nt; to honor the header's | 3127 // Stopping the loader isn't enough, as we're already parsing the docume
nt; to honor the header's |
3126 // intent, we must navigate away from the possibly partially-rendered do
cument to a location that | 3128 // intent, we must navigate away from the possibly partially-rendered do
cument to a location that |
3127 // doesn't inherit the parent's SecurityOrigin. | 3129 // doesn't inherit the parent's SecurityOrigin. |
3128 frame->navigationScheduler().scheduleLocationChange(this, SecurityOrigin
::urlWithUniqueSecurityOrigin(), Referrer()); | 3130 frame->navigationScheduler().scheduleLocationChange(this, SecurityOrigin
::urlWithUniqueSecurityOrigin(), Referrer()); |
3129 addConsoleMessageWithRequestIdentifier(SecurityMessageSource, ErrorMessa
geLevel, message, requestIdentifier); | 3131 RefPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(SecurityM
essageSource, ErrorMessageLevel, message); |
| 3132 consoleMessage->setRequestIdentifier(requestIdentifier); |
| 3133 addMessage(consoleMessage.release()); |
3130 } | 3134 } |
3131 } | 3135 } |
3132 | 3136 |
3133 bool Document::shouldMergeWithLegacyDescription(ViewportDescription::Type origin
) | 3137 bool Document::shouldMergeWithLegacyDescription(ViewportDescription::Type origin
) |
3134 { | 3138 { |
3135 return settings() && settings()->viewportMetaMergeContentQuirk() && m_legacy
ViewportDescription.isMetaViewportType() && m_legacyViewportDescription.type ==
origin; | 3139 return settings() && settings()->viewportMetaMergeContentQuirk() && m_legacy
ViewportDescription.isMetaViewportType() && m_legacyViewportDescription.type ==
origin; |
3136 } | 3140 } |
3137 | 3141 |
3138 void Document::setViewportDescription(const ViewportDescription& viewportDescrip
tion) | 3142 void Document::setViewportDescription(const ViewportDescription& viewportDescrip
tion) |
3139 { | 3143 { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3177 | 3181 |
3178 if (equalIgnoringCase(policy, "never")) { | 3182 if (equalIgnoringCase(policy, "never")) { |
3179 setReferrerPolicy(ReferrerPolicyNever); | 3183 setReferrerPolicy(ReferrerPolicyNever); |
3180 } else if (equalIgnoringCase(policy, "always")) { | 3184 } else if (equalIgnoringCase(policy, "always")) { |
3181 setReferrerPolicy(ReferrerPolicyAlways); | 3185 setReferrerPolicy(ReferrerPolicyAlways); |
3182 } else if (equalIgnoringCase(policy, "origin")) { | 3186 } else if (equalIgnoringCase(policy, "origin")) { |
3183 setReferrerPolicy(ReferrerPolicyOrigin); | 3187 setReferrerPolicy(ReferrerPolicyOrigin); |
3184 } else if (equalIgnoringCase(policy, "default")) { | 3188 } else if (equalIgnoringCase(policy, "default")) { |
3185 setReferrerPolicy(ReferrerPolicyDefault); | 3189 setReferrerPolicy(ReferrerPolicyDefault); |
3186 } else { | 3190 } else { |
3187 addConsoleMessage(RenderingMessageSource, ErrorMessageLevel, "Failed to
set referrer policy: The value '" + policy + "' is not one of 'always', 'default
', 'never', or 'origin'. Defaulting to 'never'."); | 3191 addConsoleMessage(ConsoleMessage::create(RenderingMessageSource, ErrorMe
ssageLevel, "Failed to set referrer policy: The value '" + policy + "' is not on
e of 'always', 'default', 'never', or 'origin'. Defaulting to 'never'.")); |
3188 setReferrerPolicy(ReferrerPolicyNever); | 3192 setReferrerPolicy(ReferrerPolicyNever); |
3189 } | 3193 } |
3190 } | 3194 } |
3191 | 3195 |
3192 void Document::setReferrerPolicy(ReferrerPolicy referrerPolicy) | 3196 void Document::setReferrerPolicy(ReferrerPolicy referrerPolicy) |
3193 { | 3197 { |
3194 // FIXME: Can we adopt the CSP referrer policy merge algorithm? Or does the
web rely on being able to modify the referrer policy in-flight? | 3198 // FIXME: Can we adopt the CSP referrer policy merge algorithm? Or does the
web rely on being able to modify the referrer policy in-flight? |
3195 if (m_didSetReferrerPolicy) | 3199 if (m_didSetReferrerPolicy) |
3196 UseCounter::count(this, UseCounter::ResetReferrerPolicy); | 3200 UseCounter::count(this, UseCounter::ResetReferrerPolicy); |
3197 m_didSetReferrerPolicy = true; | 3201 m_didSetReferrerPolicy = true; |
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4335 bool Document::execCommand(const String& commandName, bool userInterface, const
String& value) | 4339 bool Document::execCommand(const String& commandName, bool userInterface, const
String& value) |
4336 { | 4340 { |
4337 // We don't allow recusrive |execCommand()| to protect against attack code. | 4341 // We don't allow recusrive |execCommand()| to protect against attack code. |
4338 // Recursive call of |execCommand()| could be happened by moving iframe | 4342 // Recursive call of |execCommand()| could be happened by moving iframe |
4339 // with script triggered by insertion, e.g. <iframe src="javascript:..."> | 4343 // with script triggered by insertion, e.g. <iframe src="javascript:..."> |
4340 // <iframe onload="...">. This usage is valid as of the specification | 4344 // <iframe onload="...">. This usage is valid as of the specification |
4341 // although, it isn't common use case, rather it is used as attack code. | 4345 // although, it isn't common use case, rather it is used as attack code. |
4342 static bool inExecCommand = false; | 4346 static bool inExecCommand = false; |
4343 if (inExecCommand) { | 4347 if (inExecCommand) { |
4344 String message = "We don't execute document.execCommand() this time, bec
ause it is called recursively."; | 4348 String message = "We don't execute document.execCommand() this time, bec
ause it is called recursively."; |
4345 addConsoleMessage(JSMessageSource, WarningMessageLevel, message); | 4349 addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessage
Level, message)); |
4346 return false; | 4350 return false; |
4347 } | 4351 } |
4348 TemporaryChange<bool> executeScope(inExecCommand, true); | 4352 TemporaryChange<bool> executeScope(inExecCommand, true); |
4349 | 4353 |
4350 // Postpone DOM mutation events, which can execute scripts and change | 4354 // Postpone DOM mutation events, which can execute scripts and change |
4351 // DOM tree against implementation assumption. | 4355 // DOM tree against implementation assumption. |
4352 EventQueueScope eventQueueScope; | 4356 EventQueueScope eventQueueScope; |
4353 Editor::Command editorCommand = command(this, commandName, userInterface); | 4357 Editor::Command editorCommand = command(this, commandName, userInterface); |
4354 blink::Platform::current()->histogramSparse("WebCore.Document.execCommand",
editorCommand.idForHistogram()); | 4358 blink::Platform::current()->histogramSparse("WebCore.Document.execCommand",
editorCommand.idForHistogram()); |
4355 return editorCommand.execute(value); | 4359 return editorCommand.execute(value); |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4994 | 4998 |
4995 m_isDNSPrefetchEnabled = false; | 4999 m_isDNSPrefetchEnabled = false; |
4996 m_haveExplicitlyDisabledDNSPrefetch = true; | 5000 m_haveExplicitlyDisabledDNSPrefetch = true; |
4997 } | 5001 } |
4998 | 5002 |
4999 void Document::reportBlockedScriptExecutionToInspector(const String& directiveTe
xt) | 5003 void Document::reportBlockedScriptExecutionToInspector(const String& directiveTe
xt) |
5000 { | 5004 { |
5001 InspectorInstrumentation::scriptExecutionBlockedByCSP(this, directiveText); | 5005 InspectorInstrumentation::scriptExecutionBlockedByCSP(this, directiveText); |
5002 } | 5006 } |
5003 | 5007 |
5004 void Document::addMessage(MessageSource source, MessageLevel level, const String
& message, const String& sourceURL, unsigned lineNumber, ScriptState* scriptStat
e) | 5008 void Document::addMessage(PassRefPtr<ConsoleMessage> consoleMessage) |
5005 { | |
5006 internalAddMessage(source, level, message, sourceURL, lineNumber, nullptr, s
criptState); | |
5007 } | |
5008 | |
5009 void Document::internalAddMessage(MessageSource source, MessageLevel level, cons
t String& message, const String& sourceURL, unsigned lineNumber, PassRefPtrWillB
eRawPtr<ScriptCallStack> callStack, ScriptState* scriptState) | |
5010 { | 5009 { |
5011 if (!isContextThread()) { | 5010 if (!isContextThread()) { |
5012 m_taskRunner->postTask(AddConsoleMessageTask::create(source, level, mess
age)); | 5011 m_taskRunner->postTask(AddConsoleMessageTask::create(consoleMessage->sou
rce(), consoleMessage->level(), consoleMessage->message())); |
5013 return; | 5012 return; |
5014 } | 5013 } |
5015 | 5014 |
5016 if (!m_frame) | 5015 if (!m_frame) |
5017 return; | 5016 return; |
5018 | 5017 |
5019 String messageURL = sourceURL; | 5018 if (!consoleMessage->scriptState() && consoleMessage->url().isNull() && !con
soleMessage->lineNumber()) { |
5020 if (!scriptState && sourceURL.isNull() && !lineNumber) { | 5019 consoleMessage->setURL(url().string()); |
5021 messageURL = url().string(); | |
5022 if (parsing() && !isInDocumentWrite() && scriptableDocumentParser()) { | 5020 if (parsing() && !isInDocumentWrite() && scriptableDocumentParser()) { |
5023 ScriptableDocumentParser* parser = scriptableDocumentParser(); | 5021 ScriptableDocumentParser* parser = scriptableDocumentParser(); |
5024 if (!parser->isWaitingForScripts() && !parser->isExecutingScript()) | 5022 if (!parser->isWaitingForScripts() && !parser->isExecutingScript()) |
5025 lineNumber = parser->lineNumber().oneBasedInt(); | 5023 consoleMessage->setLineNumber(parser->lineNumber().oneBasedInt()
); |
5026 } | 5024 } |
5027 } | 5025 } |
5028 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(s
ource, level, message, messageURL, lineNumber); | 5026 m_frame->console().addMessage(consoleMessage); |
5029 consoleMessage->setCallStack(callStack); | |
5030 consoleMessage->setScriptState(scriptState); | |
5031 m_frame->console().addMessage(consoleMessage.release()); | |
5032 } | |
5033 | |
5034 void Document::addConsoleMessageWithRequestIdentifier(MessageSource source, Mess
ageLevel level, const String& message, unsigned long requestIdentifier) | |
5035 { | |
5036 if (!isContextThread()) { | |
5037 m_taskRunner->postTask(AddConsoleMessageTask::create(source, level, mess
age)); | |
5038 return; | |
5039 } | |
5040 | |
5041 if (m_frame) { | |
5042 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::crea
te(source, level, message); | |
5043 consoleMessage->setRequestIdentifier(requestIdentifier); | |
5044 m_frame->console().addMessage(consoleMessage.release()); | |
5045 } | |
5046 } | 5027 } |
5047 | 5028 |
5048 // FIXME(crbug.com/305497): This should be removed after ExecutionContext-LocalD
OMWindow migration. | 5029 // FIXME(crbug.com/305497): This should be removed after ExecutionContext-LocalD
OMWindow migration. |
5049 void Document::postTask(PassOwnPtr<ExecutionContextTask> task) | 5030 void Document::postTask(PassOwnPtr<ExecutionContextTask> task) |
5050 { | 5031 { |
5051 m_taskRunner->postTask(task); | 5032 m_taskRunner->postTask(task); |
5052 } | 5033 } |
5053 | 5034 |
5054 void Document::postInspectorTask(PassOwnPtr<ExecutionContextTask> task) | 5035 void Document::postInspectorTask(PassOwnPtr<ExecutionContextTask> task) |
5055 { | 5036 { |
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5902 using namespace blink; | 5883 using namespace blink; |
5903 void showLiveDocumentInstances() | 5884 void showLiveDocumentInstances() |
5904 { | 5885 { |
5905 WeakDocumentSet& set = liveDocumentSet(); | 5886 WeakDocumentSet& set = liveDocumentSet(); |
5906 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5887 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5907 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { | 5888 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { |
5908 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); | 5889 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); |
5909 } | 5890 } |
5910 } | 5891 } |
5911 #endif | 5892 #endif |
OLD | NEW |