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 2594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2605 RefPtrWillBeRawPtr<BeforeUnloadEvent> beforeUnloadEvent = BeforeUnloadEvent:
:create(); | 2605 RefPtrWillBeRawPtr<BeforeUnloadEvent> beforeUnloadEvent = BeforeUnloadEvent:
:create(); |
2606 m_loadEventProgress = BeforeUnloadEventInProgress; | 2606 m_loadEventProgress = BeforeUnloadEventInProgress; |
2607 m_domWindow->dispatchEvent(beforeUnloadEvent.get(), this); | 2607 m_domWindow->dispatchEvent(beforeUnloadEvent.get(), this); |
2608 m_loadEventProgress = BeforeUnloadEventCompleted; | 2608 m_loadEventProgress = BeforeUnloadEventCompleted; |
2609 if (!beforeUnloadEvent->defaultPrevented()) | 2609 if (!beforeUnloadEvent->defaultPrevented()) |
2610 defaultEventHandler(beforeUnloadEvent.get()); | 2610 defaultEventHandler(beforeUnloadEvent.get()); |
2611 if (beforeUnloadEvent->returnValue().isNull()) | 2611 if (beforeUnloadEvent->returnValue().isNull()) |
2612 return true; | 2612 return true; |
2613 | 2613 |
2614 if (didAllowNavigation) { | 2614 if (didAllowNavigation) { |
2615 addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Blocked attempt t
o show multiple 'beforeunload' confirmation panels for a single navigation."); | 2615 addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLe
vel, "Blocked attempt to show multiple 'beforeunload' confirmation panels for a
single navigation.")); |
2616 return true; | 2616 return true; |
2617 } | 2617 } |
2618 | 2618 |
2619 String text = beforeUnloadEvent->returnValue(); | 2619 String text = beforeUnloadEvent->returnValue(); |
2620 if (chrome.runBeforeUnloadConfirmPanel(text, m_frame)) { | 2620 if (chrome.runBeforeUnloadConfirmPanel(text, m_frame)) { |
2621 didAllowNavigation = true; | 2621 didAllowNavigation = true; |
2622 return true; | 2622 return true; |
2623 } | 2623 } |
2624 return false; | 2624 return false; |
2625 } | 2625 } |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2724 | 2724 |
2725 m_writeRecursionIsTooDeep = (m_writeRecursionDepth > 1) && m_writeRecursionI
sTooDeep; | 2725 m_writeRecursionIsTooDeep = (m_writeRecursionDepth > 1) && m_writeRecursionI
sTooDeep; |
2726 m_writeRecursionIsTooDeep = (m_writeRecursionDepth > cMaxWriteRecursionDepth
) || m_writeRecursionIsTooDeep; | 2726 m_writeRecursionIsTooDeep = (m_writeRecursionDepth > cMaxWriteRecursionDepth
) || m_writeRecursionIsTooDeep; |
2727 | 2727 |
2728 if (m_writeRecursionIsTooDeep) | 2728 if (m_writeRecursionIsTooDeep) |
2729 return; | 2729 return; |
2730 | 2730 |
2731 bool hasInsertionPoint = m_parser && m_parser->hasInsertionPoint(); | 2731 bool hasInsertionPoint = m_parser && m_parser->hasInsertionPoint(); |
2732 | 2732 |
2733 if (!hasInsertionPoint && m_ignoreDestructiveWriteCount) { | 2733 if (!hasInsertionPoint && m_ignoreDestructiveWriteCount) { |
2734 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
.")); | 2734 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."))); |
2735 return; | 2735 return; |
2736 } | 2736 } |
2737 | 2737 |
2738 if (!hasInsertionPoint) | 2738 if (!hasInsertionPoint) |
2739 open(ownerDocument); | 2739 open(ownerDocument); |
2740 | 2740 |
2741 ASSERT(m_parser); | 2741 ASSERT(m_parser); |
2742 m_parser->insert(text); | 2742 m_parser->insert(text); |
2743 } | 2743 } |
2744 | 2744 |
(...skipping 26 matching lines...) Expand all Loading... |
2771 if (!p) | 2771 if (!p) |
2772 return DOMTimer::visiblePageAlignmentInterval(); | 2772 return DOMTimer::visiblePageAlignmentInterval(); |
2773 return p->timerAlignmentInterval(); | 2773 return p->timerAlignmentInterval(); |
2774 } | 2774 } |
2775 | 2775 |
2776 EventTarget* Document::errorEventTarget() | 2776 EventTarget* Document::errorEventTarget() |
2777 { | 2777 { |
2778 return domWindow(); | 2778 return domWindow(); |
2779 } | 2779 } |
2780 | 2780 |
2781 void Document::logExceptionToConsole(const String& errorMessage, const String& s
ourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptCallSta
ck> callStack) | 2781 void Document::logExceptionToConsole(PassRefPtr<ConsoleMessage> consoleError) |
2782 { | 2782 { |
2783 internalAddMessage(JSMessageSource, ErrorMessageLevel, errorMessage, sourceU
RL, lineNumber, callStack, 0); | 2783 internalAddMessage(consoleError); |
2784 } | 2784 } |
2785 | 2785 |
2786 void Document::setURL(const KURL& url) | 2786 void Document::setURL(const KURL& url) |
2787 { | 2787 { |
2788 const KURL& newURL = url.isEmpty() ? blankURL() : url; | 2788 const KURL& newURL = url.isEmpty() ? blankURL() : url; |
2789 if (newURL == m_url) | 2789 if (newURL == m_url) |
2790 return; | 2790 return; |
2791 | 2791 |
2792 m_url = newURL; | 2792 m_url = newURL; |
2793 updateBaseURL(); | 2793 updateBaseURL(); |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3065 String refreshURL; | 3065 String refreshURL; |
3066 if (!parseHTTPRefresh(content, httpRefreshType == HttpRefreshFromMetaTag, de
lay, refreshURL)) | 3066 if (!parseHTTPRefresh(content, httpRefreshType == HttpRefreshFromMetaTag, de
lay, refreshURL)) |
3067 return; | 3067 return; |
3068 if (refreshURL.isEmpty()) | 3068 if (refreshURL.isEmpty()) |
3069 refreshURL = url().string(); | 3069 refreshURL = url().string(); |
3070 else | 3070 else |
3071 refreshURL = completeURL(refreshURL).string(); | 3071 refreshURL = completeURL(refreshURL).string(); |
3072 | 3072 |
3073 if (protocolIsJavaScript(refreshURL)) { | 3073 if (protocolIsJavaScript(refreshURL)) { |
3074 String message = "Refused to refresh " + m_url.elidedString() + " to a j
avascript: URL"; | 3074 String message = "Refused to refresh " + m_url.elidedString() + " to a j
avascript: URL"; |
3075 addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message); | 3075 addConsoleMessage(ConsoleMessage::create(SecurityMessageSource, ErrorMes
sageLevel, message)); |
3076 return; | 3076 return; |
3077 } | 3077 } |
3078 | 3078 |
3079 if (httpRefreshType == HttpRefreshFromMetaTag && isSandboxed(SandboxAutomati
cFeatures)) { | 3079 if (httpRefreshType == HttpRefreshFromMetaTag && isSandboxed(SandboxAutomati
cFeatures)) { |
3080 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."; | 3080 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."; |
3081 addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message); | 3081 addConsoleMessage(ConsoleMessage::create(SecurityMessageSource, ErrorMes
sageLevel, message)); |
3082 return; | 3082 return; |
3083 } | 3083 } |
3084 m_frame->navigationScheduler().scheduleRedirect(delay, refreshURL); | 3084 m_frame->navigationScheduler().scheduleRedirect(delay, refreshURL); |
3085 } | 3085 } |
3086 | 3086 |
3087 void Document::processHttpEquivSetCookie(const AtomicString& content) | 3087 void Document::processHttpEquivSetCookie(const AtomicString& content) |
3088 { | 3088 { |
3089 // FIXME: make setCookie work on XML documents too; e.g. in case of <html:me
ta .....> | 3089 // FIXME: make setCookie work on XML documents too; e.g. in case of <html:me
ta .....> |
3090 if (!isHTMLDocument()) | 3090 if (!isHTMLDocument()) |
3091 return; | 3091 return; |
(...skipping 10 matching lines...) Expand all Loading... |
3102 | 3102 |
3103 FrameLoader& frameLoader = frame->loader(); | 3103 FrameLoader& frameLoader = frame->loader(); |
3104 unsigned long requestIdentifier = loader()->mainResourceIdentifier(); | 3104 unsigned long requestIdentifier = loader()->mainResourceIdentifier(); |
3105 if (frameLoader.shouldInterruptLoadForXFrameOptions(content, url(), requestI
dentifier)) { | 3105 if (frameLoader.shouldInterruptLoadForXFrameOptions(content, url(), requestI
dentifier)) { |
3106 String message = "Refused to display '" + url().elidedString() + "' in a
frame because it set 'X-Frame-Options' to '" + content + "'."; | 3106 String message = "Refused to display '" + url().elidedString() + "' in a
frame because it set 'X-Frame-Options' to '" + content + "'."; |
3107 frameLoader.stopAllLoaders(); | 3107 frameLoader.stopAllLoaders(); |
3108 // Stopping the loader isn't enough, as we're already parsing the docume
nt; to honor the header's | 3108 // Stopping the loader isn't enough, as we're already parsing the docume
nt; to honor the header's |
3109 // intent, we must navigate away from the possibly partially-rendered do
cument to a location that | 3109 // intent, we must navigate away from the possibly partially-rendered do
cument to a location that |
3110 // doesn't inherit the parent's SecurityOrigin. | 3110 // doesn't inherit the parent's SecurityOrigin. |
3111 frame->navigationScheduler().scheduleLocationChange(this, SecurityOrigin
::urlWithUniqueSecurityOrigin(), Referrer()); | 3111 frame->navigationScheduler().scheduleLocationChange(this, SecurityOrigin
::urlWithUniqueSecurityOrigin(), Referrer()); |
3112 addConsoleMessageWithRequestIdentifier(SecurityMessageSource, ErrorMessa
geLevel, message, requestIdentifier); | 3112 addConsoleMessageWithRequestIdentifier(ConsoleMessage::create(SecurityMe
ssageSource, ErrorMessageLevel, message, requestIdentifier)); |
3113 } | 3113 } |
3114 } | 3114 } |
3115 | 3115 |
3116 bool Document::shouldMergeWithLegacyDescription(ViewportDescription::Type origin
) | 3116 bool Document::shouldMergeWithLegacyDescription(ViewportDescription::Type origin
) |
3117 { | 3117 { |
3118 return settings() && settings()->viewportMetaMergeContentQuirk() && m_legacy
ViewportDescription.isMetaViewportType() && m_legacyViewportDescription.type ==
origin; | 3118 return settings() && settings()->viewportMetaMergeContentQuirk() && m_legacy
ViewportDescription.isMetaViewportType() && m_legacyViewportDescription.type ==
origin; |
3119 } | 3119 } |
3120 | 3120 |
3121 void Document::setViewportDescription(const ViewportDescription& viewportDescrip
tion) | 3121 void Document::setViewportDescription(const ViewportDescription& viewportDescrip
tion) |
3122 { | 3122 { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3163 | 3163 |
3164 if (equalIgnoringCase(policy, "never")) { | 3164 if (equalIgnoringCase(policy, "never")) { |
3165 setReferrerPolicy(ReferrerPolicyNever); | 3165 setReferrerPolicy(ReferrerPolicyNever); |
3166 } else if (equalIgnoringCase(policy, "always")) { | 3166 } else if (equalIgnoringCase(policy, "always")) { |
3167 setReferrerPolicy(ReferrerPolicyAlways); | 3167 setReferrerPolicy(ReferrerPolicyAlways); |
3168 } else if (equalIgnoringCase(policy, "origin")) { | 3168 } else if (equalIgnoringCase(policy, "origin")) { |
3169 setReferrerPolicy(ReferrerPolicyOrigin); | 3169 setReferrerPolicy(ReferrerPolicyOrigin); |
3170 } else if (equalIgnoringCase(policy, "default")) { | 3170 } else if (equalIgnoringCase(policy, "default")) { |
3171 setReferrerPolicy(ReferrerPolicyDefault); | 3171 setReferrerPolicy(ReferrerPolicyDefault); |
3172 } else { | 3172 } else { |
3173 addConsoleMessage(RenderingMessageSource, ErrorMessageLevel, "Failed to
set referrer policy: The value '" + policy + "' is not one of 'always', 'default
', 'never', or 'origin'. Defaulting to 'never'."); | 3173 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'.")); |
3174 setReferrerPolicy(ReferrerPolicyNever); | 3174 setReferrerPolicy(ReferrerPolicyNever); |
3175 } | 3175 } |
3176 } | 3176 } |
3177 | 3177 |
3178 void Document::setReferrerPolicy(ReferrerPolicy referrerPolicy) | 3178 void Document::setReferrerPolicy(ReferrerPolicy referrerPolicy) |
3179 { | 3179 { |
3180 // 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? | 3180 // 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? |
3181 if (m_didSetReferrerPolicy) | 3181 if (m_didSetReferrerPolicy) |
3182 UseCounter::count(this, UseCounter::ResetReferrerPolicy); | 3182 UseCounter::count(this, UseCounter::ResetReferrerPolicy); |
3183 m_didSetReferrerPolicy = true; | 3183 m_didSetReferrerPolicy = true; |
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4319 bool Document::execCommand(const String& commandName, bool userInterface, const
String& value) | 4319 bool Document::execCommand(const String& commandName, bool userInterface, const
String& value) |
4320 { | 4320 { |
4321 // We don't allow recusrive |execCommand()| to protect against attack code. | 4321 // We don't allow recusrive |execCommand()| to protect against attack code. |
4322 // Recursive call of |execCommand()| could be happened by moving iframe | 4322 // Recursive call of |execCommand()| could be happened by moving iframe |
4323 // with script triggered by insertion, e.g. <iframe src="javascript:..."> | 4323 // with script triggered by insertion, e.g. <iframe src="javascript:..."> |
4324 // <iframe onload="...">. This usage is valid as of the specification | 4324 // <iframe onload="...">. This usage is valid as of the specification |
4325 // although, it isn't common use case, rather it is used as attack code. | 4325 // although, it isn't common use case, rather it is used as attack code. |
4326 static bool inExecCommand = false; | 4326 static bool inExecCommand = false; |
4327 if (inExecCommand) { | 4327 if (inExecCommand) { |
4328 String message = "We don't execute document.execCommand() this time, bec
ause it is called recursively."; | 4328 String message = "We don't execute document.execCommand() this time, bec
ause it is called recursively."; |
4329 addConsoleMessage(JSMessageSource, WarningMessageLevel, message); | 4329 addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessage
Level, message)); |
4330 return false; | 4330 return false; |
4331 } | 4331 } |
4332 TemporaryChange<bool> executeScope(inExecCommand, true); | 4332 TemporaryChange<bool> executeScope(inExecCommand, true); |
4333 | 4333 |
4334 // Postpone DOM mutation events, which can execute scripts and change | 4334 // Postpone DOM mutation events, which can execute scripts and change |
4335 // DOM tree against implementation assumption. | 4335 // DOM tree against implementation assumption. |
4336 EventQueueScope eventQueueScope; | 4336 EventQueueScope eventQueueScope; |
4337 Editor::Command editorCommand = command(this, commandName, userInterface); | 4337 Editor::Command editorCommand = command(this, commandName, userInterface); |
4338 blink::Platform::current()->histogramSparse("WebCore.Document.execCommand",
editorCommand.idForHistogram()); | 4338 blink::Platform::current()->histogramSparse("WebCore.Document.execCommand",
editorCommand.idForHistogram()); |
4339 return editorCommand.execute(value); | 4339 return editorCommand.execute(value); |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4992 | 4992 |
4993 m_isDNSPrefetchEnabled = false; | 4993 m_isDNSPrefetchEnabled = false; |
4994 m_haveExplicitlyDisabledDNSPrefetch = true; | 4994 m_haveExplicitlyDisabledDNSPrefetch = true; |
4995 } | 4995 } |
4996 | 4996 |
4997 void Document::reportBlockedScriptExecutionToInspector(const String& directiveTe
xt) | 4997 void Document::reportBlockedScriptExecutionToInspector(const String& directiveTe
xt) |
4998 { | 4998 { |
4999 InspectorInstrumentation::scriptExecutionBlockedByCSP(this, directiveText); | 4999 InspectorInstrumentation::scriptExecutionBlockedByCSP(this, directiveText); |
5000 } | 5000 } |
5001 | 5001 |
5002 void Document::addMessage(MessageSource source, MessageLevel level, const String
& message, const String& sourceURL, unsigned lineNumber, ScriptState* scriptStat
e) | 5002 void Document::addMessage(PassRefPtr<ConsoleMessage> consoleError) |
5003 { | 5003 { |
5004 internalAddMessage(source, level, message, sourceURL, lineNumber, nullptr, s
criptState); | 5004 internalAddMessage(consoleError); |
5005 } | 5005 } |
5006 | 5006 |
5007 void Document::internalAddMessage(MessageSource source, MessageLevel level, cons
t String& message, const String& sourceURL, unsigned lineNumber, PassRefPtrWillB
eRawPtr<ScriptCallStack> callStack, ScriptState* scriptState) | 5007 void Document::internalAddMessage(PassRefPtr<ConsoleMessage> consoleMessage) |
5008 { | 5008 { |
5009 if (!isContextThread()) { | 5009 if (!isContextThread()) { |
5010 m_taskRunner->postTask(AddConsoleMessageTask::create(source, level, mess
age)); | 5010 m_taskRunner->postTask(AddConsoleMessageTask::create(consoleMessage->sou
rce(), consoleMessage->level(), consoleMessage->message())); |
5011 return; | 5011 return; |
5012 } | 5012 } |
5013 | 5013 |
5014 if (!m_frame) | 5014 if (!m_frame) |
5015 return; | 5015 return; |
5016 | 5016 |
5017 String messageURL = sourceURL; | 5017 if (consoleMessage->url().isNull() && !consoleMessage->lineNumber()) { |
5018 if (!scriptState && sourceURL.isNull() && !lineNumber) { | 5018 consoleMessage->setURL(url().string()); |
5019 messageURL = url().string(); | |
5020 if (parsing() && !isInDocumentWrite() && scriptableDocumentParser()) { | 5019 if (parsing() && !isInDocumentWrite() && scriptableDocumentParser()) { |
5021 ScriptableDocumentParser* parser = scriptableDocumentParser(); | 5020 ScriptableDocumentParser* parser = scriptableDocumentParser(); |
5022 if (!parser->isWaitingForScripts() && !parser->isExecutingScript()) | 5021 if (!parser->isWaitingForScripts() && !parser->isExecutingScript()) |
5023 lineNumber = parser->lineNumber().oneBasedInt(); | 5022 consoleMessage->setLineNumber(parser->lineNumber().oneBasedInt()
); |
5024 } | 5023 } |
5025 } | 5024 } |
5026 m_frame->console().addMessage(source, level, message, messageURL, lineNumber
, 0, callStack, scriptState, 0); | 5025 m_frame->console().addMessage(consoleMessage); |
5027 } | 5026 } |
5028 | 5027 |
5029 void Document::addConsoleMessageWithRequestIdentifier(MessageSource source, Mess
ageLevel level, const String& message, unsigned long requestIdentifier) | 5028 void Document::addConsoleMessageWithRequestIdentifier(PassRefPtr<ConsoleMessage>
consoleMessage) |
5030 { | 5029 { |
5031 if (!isContextThread()) { | 5030 if (!isContextThread()) { |
5032 m_taskRunner->postTask(AddConsoleMessageTask::create(source, level, mess
age)); | 5031 m_taskRunner->postTask(AddConsoleMessageTask::create(consoleMessage->sou
rce(), consoleMessage->level(), consoleMessage->message())); |
5033 return; | 5032 return; |
5034 } | 5033 } |
5035 | 5034 |
5036 if (m_frame) | 5035 if (m_frame) |
5037 m_frame->console().addMessage(source, level, message, String(), 0, 0, nu
llptr, 0, requestIdentifier); | 5036 m_frame->console().addMessage(consoleMessage); |
5038 } | 5037 } |
5039 | 5038 |
5040 // FIXME(crbug.com/305497): This should be removed after ExecutionContext-LocalD
OMWindow migration. | 5039 // FIXME(crbug.com/305497): This should be removed after ExecutionContext-LocalD
OMWindow migration. |
5041 void Document::postTask(PassOwnPtr<ExecutionContextTask> task) | 5040 void Document::postTask(PassOwnPtr<ExecutionContextTask> task) |
5042 { | 5041 { |
5043 m_taskRunner->postTask(task); | 5042 m_taskRunner->postTask(task); |
5044 } | 5043 } |
5045 | 5044 |
5046 void Document::postInspectorTask(PassOwnPtr<ExecutionContextTask> task) | 5045 void Document::postInspectorTask(PassOwnPtr<ExecutionContextTask> task) |
5047 { | 5046 { |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5762 using namespace WebCore; | 5761 using namespace WebCore; |
5763 void showLiveDocumentInstances() | 5762 void showLiveDocumentInstances() |
5764 { | 5763 { |
5765 WeakDocumentSet& set = liveDocumentSet(); | 5764 WeakDocumentSet& set = liveDocumentSet(); |
5766 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5765 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5767 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { | 5766 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { |
5768 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); | 5767 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); |
5769 } | 5768 } |
5770 } | 5769 } |
5771 #endif | 5770 #endif |
OLD | NEW |