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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3079 String refreshURL; | 3081 String refreshURL; |
3080 if (!parseHTTPRefresh(content, httpRefreshType == HttpRefreshFromMetaTag, de
lay, refreshURL)) | 3082 if (!parseHTTPRefresh(content, httpRefreshType == HttpRefreshFromMetaTag, de
lay, refreshURL)) |
3081 return; | 3083 return; |
3082 if (refreshURL.isEmpty()) | 3084 if (refreshURL.isEmpty()) |
3083 refreshURL = url().string(); | 3085 refreshURL = url().string(); |
3084 else | 3086 else |
3085 refreshURL = completeURL(refreshURL).string(); | 3087 refreshURL = completeURL(refreshURL).string(); |
3086 | 3088 |
3087 if (protocolIsJavaScript(refreshURL)) { | 3089 if (protocolIsJavaScript(refreshURL)) { |
3088 String message = "Refused to refresh " + m_url.elidedString() + " to a j
avascript: URL"; | 3090 String message = "Refused to refresh " + m_url.elidedString() + " to a j
avascript: URL"; |
3089 addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message); | 3091 addConsoleMessage(ConsoleMessage::create(SecurityMessageSource, ErrorMes
sageLevel, message)); |
3090 return; | 3092 return; |
3091 } | 3093 } |
3092 | 3094 |
3093 if (httpRefreshType == HttpRefreshFromMetaTag && isSandboxed(SandboxAutomati
cFeatures)) { | 3095 if (httpRefreshType == HttpRefreshFromMetaTag && isSandboxed(SandboxAutomati
cFeatures)) { |
3094 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."; | 3096 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."; |
3095 addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message); | 3097 addConsoleMessage(ConsoleMessage::create(SecurityMessageSource, ErrorMes
sageLevel, message)); |
3096 return; | 3098 return; |
3097 } | 3099 } |
3098 m_frame->navigationScheduler().scheduleRedirect(delay, refreshURL); | 3100 m_frame->navigationScheduler().scheduleRedirect(delay, refreshURL); |
3099 } | 3101 } |
3100 | 3102 |
3101 void Document::processHttpEquivSetCookie(const AtomicString& content) | 3103 void Document::processHttpEquivSetCookie(const AtomicString& content) |
3102 { | 3104 { |
3103 // FIXME: make setCookie work on XML documents too; e.g. in case of <html:me
ta .....> | 3105 // FIXME: make setCookie work on XML documents too; e.g. in case of <html:me
ta .....> |
3104 if (!isHTMLDocument()) | 3106 if (!isHTMLDocument()) |
3105 return; | 3107 return; |
(...skipping 10 matching lines...) Expand all Loading... |
3116 | 3118 |
3117 FrameLoader& frameLoader = frame->loader(); | 3119 FrameLoader& frameLoader = frame->loader(); |
3118 unsigned long requestIdentifier = loader()->mainResourceIdentifier(); | 3120 unsigned long requestIdentifier = loader()->mainResourceIdentifier(); |
3119 if (frameLoader.shouldInterruptLoadForXFrameOptions(content, url(), requestI
dentifier)) { | 3121 if (frameLoader.shouldInterruptLoadForXFrameOptions(content, url(), requestI
dentifier)) { |
3120 String message = "Refused to display '" + url().elidedString() + "' in a
frame because it set 'X-Frame-Options' to '" + content + "'."; | 3122 String message = "Refused to display '" + url().elidedString() + "' in a
frame because it set 'X-Frame-Options' to '" + content + "'."; |
3121 frameLoader.stopAllLoaders(); | 3123 frameLoader.stopAllLoaders(); |
3122 // Stopping the loader isn't enough, as we're already parsing the docume
nt; to honor the header's | 3124 // Stopping the loader isn't enough, as we're already parsing the docume
nt; to honor the header's |
3123 // intent, we must navigate away from the possibly partially-rendered do
cument to a location that | 3125 // intent, we must navigate away from the possibly partially-rendered do
cument to a location that |
3124 // doesn't inherit the parent's SecurityOrigin. | 3126 // doesn't inherit the parent's SecurityOrigin. |
3125 frame->navigationScheduler().scheduleLocationChange(this, SecurityOrigin
::urlWithUniqueSecurityOrigin(), Referrer()); | 3127 frame->navigationScheduler().scheduleLocationChange(this, SecurityOrigin
::urlWithUniqueSecurityOrigin(), Referrer()); |
3126 addConsoleMessageWithRequestIdentifier(SecurityMessageSource, ErrorMessa
geLevel, message, requestIdentifier); | 3128 RefPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(SecurityM
essageSource, ErrorMessageLevel, message); |
| 3129 consoleMessage->setRequestIdentifier(requestIdentifier); |
| 3130 addMessage(consoleMessage.release()); |
3127 } | 3131 } |
3128 } | 3132 } |
3129 | 3133 |
3130 bool Document::shouldMergeWithLegacyDescription(ViewportDescription::Type origin
) | 3134 bool Document::shouldMergeWithLegacyDescription(ViewportDescription::Type origin
) |
3131 { | 3135 { |
3132 return settings() && settings()->viewportMetaMergeContentQuirk() && m_legacy
ViewportDescription.isMetaViewportType() && m_legacyViewportDescription.type ==
origin; | 3136 return settings() && settings()->viewportMetaMergeContentQuirk() && m_legacy
ViewportDescription.isMetaViewportType() && m_legacyViewportDescription.type ==
origin; |
3133 } | 3137 } |
3134 | 3138 |
3135 void Document::setViewportDescription(const ViewportDescription& viewportDescrip
tion) | 3139 void Document::setViewportDescription(const ViewportDescription& viewportDescrip
tion) |
3136 { | 3140 { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3174 | 3178 |
3175 if (equalIgnoringCase(policy, "never")) { | 3179 if (equalIgnoringCase(policy, "never")) { |
3176 setReferrerPolicy(ReferrerPolicyNever); | 3180 setReferrerPolicy(ReferrerPolicyNever); |
3177 } else if (equalIgnoringCase(policy, "always")) { | 3181 } else if (equalIgnoringCase(policy, "always")) { |
3178 setReferrerPolicy(ReferrerPolicyAlways); | 3182 setReferrerPolicy(ReferrerPolicyAlways); |
3179 } else if (equalIgnoringCase(policy, "origin")) { | 3183 } else if (equalIgnoringCase(policy, "origin")) { |
3180 setReferrerPolicy(ReferrerPolicyOrigin); | 3184 setReferrerPolicy(ReferrerPolicyOrigin); |
3181 } else if (equalIgnoringCase(policy, "default")) { | 3185 } else if (equalIgnoringCase(policy, "default")) { |
3182 setReferrerPolicy(ReferrerPolicyDefault); | 3186 setReferrerPolicy(ReferrerPolicyDefault); |
3183 } else { | 3187 } else { |
3184 addConsoleMessage(RenderingMessageSource, ErrorMessageLevel, "Failed to
set referrer policy: The value '" + policy + "' is not one of 'always', 'default
', 'never', or 'origin'. Defaulting to 'never'."); | 3188 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'.")); |
3185 setReferrerPolicy(ReferrerPolicyNever); | 3189 setReferrerPolicy(ReferrerPolicyNever); |
3186 } | 3190 } |
3187 } | 3191 } |
3188 | 3192 |
3189 void Document::setReferrerPolicy(ReferrerPolicy referrerPolicy) | 3193 void Document::setReferrerPolicy(ReferrerPolicy referrerPolicy) |
3190 { | 3194 { |
3191 // 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 // 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? |
3192 if (m_didSetReferrerPolicy) | 3196 if (m_didSetReferrerPolicy) |
3193 UseCounter::count(this, UseCounter::ResetReferrerPolicy); | 3197 UseCounter::count(this, UseCounter::ResetReferrerPolicy); |
3194 m_didSetReferrerPolicy = true; | 3198 m_didSetReferrerPolicy = true; |
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4332 bool Document::execCommand(const String& commandName, bool userInterface, const
String& value) | 4336 bool Document::execCommand(const String& commandName, bool userInterface, const
String& value) |
4333 { | 4337 { |
4334 // We don't allow recusrive |execCommand()| to protect against attack code. | 4338 // We don't allow recusrive |execCommand()| to protect against attack code. |
4335 // Recursive call of |execCommand()| could be happened by moving iframe | 4339 // Recursive call of |execCommand()| could be happened by moving iframe |
4336 // with script triggered by insertion, e.g. <iframe src="javascript:..."> | 4340 // with script triggered by insertion, e.g. <iframe src="javascript:..."> |
4337 // <iframe onload="...">. This usage is valid as of the specification | 4341 // <iframe onload="...">. This usage is valid as of the specification |
4338 // although, it isn't common use case, rather it is used as attack code. | 4342 // although, it isn't common use case, rather it is used as attack code. |
4339 static bool inExecCommand = false; | 4343 static bool inExecCommand = false; |
4340 if (inExecCommand) { | 4344 if (inExecCommand) { |
4341 String message = "We don't execute document.execCommand() this time, bec
ause it is called recursively."; | 4345 String message = "We don't execute document.execCommand() this time, bec
ause it is called recursively."; |
4342 addConsoleMessage(JSMessageSource, WarningMessageLevel, message); | 4346 addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessage
Level, message)); |
4343 return false; | 4347 return false; |
4344 } | 4348 } |
4345 TemporaryChange<bool> executeScope(inExecCommand, true); | 4349 TemporaryChange<bool> executeScope(inExecCommand, true); |
4346 | 4350 |
4347 // Postpone DOM mutation events, which can execute scripts and change | 4351 // Postpone DOM mutation events, which can execute scripts and change |
4348 // DOM tree against implementation assumption. | 4352 // DOM tree against implementation assumption. |
4349 EventQueueScope eventQueueScope; | 4353 EventQueueScope eventQueueScope; |
4350 Editor::Command editorCommand = command(this, commandName, userInterface); | 4354 Editor::Command editorCommand = command(this, commandName, userInterface); |
4351 blink::Platform::current()->histogramSparse("WebCore.Document.execCommand",
editorCommand.idForHistogram()); | 4355 blink::Platform::current()->histogramSparse("WebCore.Document.execCommand",
editorCommand.idForHistogram()); |
4352 return editorCommand.execute(value); | 4356 return editorCommand.execute(value); |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4991 | 4995 |
4992 m_isDNSPrefetchEnabled = false; | 4996 m_isDNSPrefetchEnabled = false; |
4993 m_haveExplicitlyDisabledDNSPrefetch = true; | 4997 m_haveExplicitlyDisabledDNSPrefetch = true; |
4994 } | 4998 } |
4995 | 4999 |
4996 void Document::reportBlockedScriptExecutionToInspector(const String& directiveTe
xt) | 5000 void Document::reportBlockedScriptExecutionToInspector(const String& directiveTe
xt) |
4997 { | 5001 { |
4998 InspectorInstrumentation::scriptExecutionBlockedByCSP(this, directiveText); | 5002 InspectorInstrumentation::scriptExecutionBlockedByCSP(this, directiveText); |
4999 } | 5003 } |
5000 | 5004 |
5001 void Document::addMessage(MessageSource source, MessageLevel level, const String
& message, const String& sourceURL, unsigned lineNumber, ScriptState* scriptStat
e) | 5005 void Document::addMessage(PassRefPtr<ConsoleMessage> consoleMessage) |
5002 { | |
5003 internalAddMessage(source, level, message, sourceURL, lineNumber, nullptr, s
criptState); | |
5004 } | |
5005 | |
5006 void Document::internalAddMessage(MessageSource source, MessageLevel level, cons
t String& message, const String& sourceURL, unsigned lineNumber, PassRefPtrWillB
eRawPtr<ScriptCallStack> callStack, ScriptState* scriptState) | |
5007 { | 5006 { |
5008 if (!isContextThread()) { | 5007 if (!isContextThread()) { |
5009 m_taskRunner->postTask(AddConsoleMessageTask::create(source, level, mess
age)); | 5008 m_taskRunner->postTask(AddConsoleMessageTask::create(consoleMessage->sou
rce(), consoleMessage->level(), consoleMessage->message())); |
5010 return; | 5009 return; |
5011 } | 5010 } |
5012 | 5011 |
5013 if (!m_frame) | 5012 if (!m_frame) |
5014 return; | 5013 return; |
5015 | 5014 |
5016 String messageURL = sourceURL; | 5015 if (!consoleMessage->scriptState() && consoleMessage->url().isNull() && !con
soleMessage->lineNumber()) { |
5017 if (!scriptState && sourceURL.isNull() && !lineNumber) { | 5016 consoleMessage->setURL(url().string()); |
5018 messageURL = url().string(); | |
5019 if (parsing() && !isInDocumentWrite() && scriptableDocumentParser()) { | 5017 if (parsing() && !isInDocumentWrite() && scriptableDocumentParser()) { |
5020 ScriptableDocumentParser* parser = scriptableDocumentParser(); | 5018 ScriptableDocumentParser* parser = scriptableDocumentParser(); |
5021 if (!parser->isWaitingForScripts() && !parser->isExecutingScript()) | 5019 if (!parser->isWaitingForScripts() && !parser->isExecutingScript()) |
5022 lineNumber = parser->lineNumber().oneBasedInt(); | 5020 consoleMessage->setLineNumber(parser->lineNumber().oneBasedInt()
); |
5023 } | 5021 } |
5024 } | 5022 } |
5025 RefPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(source, level
, message, messageURL, lineNumber); | 5023 m_frame->console().addMessage(consoleMessage); |
5026 consoleMessage->setCallStack(callStack); | |
5027 consoleMessage->setScriptState(scriptState); | |
5028 m_frame->console().addMessage(consoleMessage.release()); | |
5029 } | |
5030 | |
5031 void Document::addConsoleMessageWithRequestIdentifier(MessageSource source, Mess
ageLevel level, const String& message, unsigned long requestIdentifier) | |
5032 { | |
5033 if (!isContextThread()) { | |
5034 m_taskRunner->postTask(AddConsoleMessageTask::create(source, level, mess
age)); | |
5035 return; | |
5036 } | |
5037 | |
5038 if (m_frame) { | |
5039 RefPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(source, l
evel, message); | |
5040 consoleMessage->setRequestIdentifier(requestIdentifier); | |
5041 m_frame->console().addMessage(consoleMessage.release()); | |
5042 } | |
5043 } | 5024 } |
5044 | 5025 |
5045 // FIXME(crbug.com/305497): This should be removed after ExecutionContext-LocalD
OMWindow migration. | 5026 // FIXME(crbug.com/305497): This should be removed after ExecutionContext-LocalD
OMWindow migration. |
5046 void Document::postTask(PassOwnPtr<ExecutionContextTask> task) | 5027 void Document::postTask(PassOwnPtr<ExecutionContextTask> task) |
5047 { | 5028 { |
5048 m_taskRunner->postTask(task); | 5029 m_taskRunner->postTask(task); |
5049 } | 5030 } |
5050 | 5031 |
5051 void Document::postInspectorTask(PassOwnPtr<ExecutionContextTask> task) | 5032 void Document::postInspectorTask(PassOwnPtr<ExecutionContextTask> task) |
5052 { | 5033 { |
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5899 using namespace blink; | 5880 using namespace blink; |
5900 void showLiveDocumentInstances() | 5881 void showLiveDocumentInstances() |
5901 { | 5882 { |
5902 WeakDocumentSet& set = liveDocumentSet(); | 5883 WeakDocumentSet& set = liveDocumentSet(); |
5903 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5884 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5904 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { | 5885 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { |
5905 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); | 5886 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); |
5906 } | 5887 } |
5907 } | 5888 } |
5908 #endif | 5889 #endif |
OLD | NEW |