| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 | 670 |
| 671 event->entangleMessagePorts(document()); | 671 event->entangleMessagePorts(document()); |
| 672 dispatchMessageEventWithOriginCheck(timer->targetOrigin(), event, timer->sta
ckTrace()); | 672 dispatchMessageEventWithOriginCheck(timer->targetOrigin(), event, timer->sta
ckTrace()); |
| 673 m_postMessageTimers.remove(timer); | 673 m_postMessageTimers.remove(timer); |
| 674 } | 674 } |
| 675 | 675 |
| 676 void LocalDOMWindow::dispatchMessageEventWithOriginCheck(SecurityOrigin* intende
dTargetOrigin, PassRefPtrWillBeRawPtr<Event> event, PassRefPtrWillBeRawPtr<Scrip
tCallStack> stackTrace) | 676 void LocalDOMWindow::dispatchMessageEventWithOriginCheck(SecurityOrigin* intende
dTargetOrigin, PassRefPtrWillBeRawPtr<Event> event, PassRefPtrWillBeRawPtr<Scrip
tCallStack> stackTrace) |
| 677 { | 677 { |
| 678 if (intendedTargetOrigin) { | 678 if (intendedTargetOrigin) { |
| 679 // Check target origin now since the target document may have changed si
nce the timer was scheduled. | 679 // Check target origin now since the target document may have changed si
nce the timer was scheduled. |
| 680 if (!intendedTargetOrigin->isSameSchemeHostPort(document()->securityOrig
in())) { | 680 if (!intendedTargetOrigin->isSameSchemeHostPortAndSuborigin(document()->
securityOrigin())) { |
| 681 String message = ExceptionMessages::failedToExecute("postMessage", "
DOMWindow", "The target origin provided ('" + intendedTargetOrigin->toString() +
"') does not match the recipient window's origin ('" + document()->securityOrig
in()->toString() + "')."); | 681 String message = ExceptionMessages::failedToExecute("postMessage", "
DOMWindow", "The target origin provided ('" + intendedTargetOrigin->toString() +
"') does not match the recipient window's origin ('" + document()->securityOrig
in()->toString() + "')."); |
| 682 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::
create(SecurityMessageSource, ErrorMessageLevel, message); | 682 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::
create(SecurityMessageSource, ErrorMessageLevel, message); |
| 683 consoleMessage->setCallStack(stackTrace); | 683 consoleMessage->setCallStack(stackTrace); |
| 684 frameConsole()->addMessage(consoleMessage.release()); | 684 frameConsole()->addMessage(consoleMessage.release()); |
| 685 return; | 685 return; |
| 686 } | 686 } |
| 687 } | 687 } |
| 688 | 688 |
| 689 dispatchEvent(event); | 689 dispatchEvent(event); |
| 690 } | 690 } |
| (...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1503 DOMWindow::trace(visitor); | 1503 DOMWindow::trace(visitor); |
| 1504 DOMWindowLifecycleNotifier::trace(visitor); | 1504 DOMWindowLifecycleNotifier::trace(visitor); |
| 1505 } | 1505 } |
| 1506 | 1506 |
| 1507 LocalFrame* LocalDOMWindow::frame() const | 1507 LocalFrame* LocalDOMWindow::frame() const |
| 1508 { | 1508 { |
| 1509 return m_frameObserver->frame(); | 1509 return m_frameObserver->frame(); |
| 1510 } | 1510 } |
| 1511 | 1511 |
| 1512 } // namespace blink | 1512 } // namespace blink |
| OLD | NEW |