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

Side by Side Diff: Source/core/page/EventSource.cpp

Issue 718383003: bindings: fixed incorrect dependency of SerializedScriptValue. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added fast/js/structured-clone.html Created 6 years 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
« no previous file with comments | « Source/core/dom/MessagePort.cpp ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2012 Ericsson AB. All rights reserved. 2 * Copyright (C) 2009, 2012 Ericsson AB. All rights reserved.
3 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2010 Apple Inc. All rights reserved.
4 * Copyright (C) 2011, Code Aurora Forum. All rights reserved. 4 * Copyright (C) 2011, Code Aurora Forum. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 18 matching lines...) Expand all
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */ 31 */
32 32
33 #include "config.h" 33 #include "config.h"
34 #include "core/page/EventSource.h" 34 #include "core/page/EventSource.h"
35 35
36 #include "bindings/core/v8/ExceptionState.h" 36 #include "bindings/core/v8/ExceptionState.h"
37 #include "bindings/core/v8/ScriptController.h" 37 #include "bindings/core/v8/ScriptController.h"
38 #include "bindings/core/v8/SerializedScriptValue.h" 38 #include "bindings/core/v8/SerializedScriptValue.h"
39 #include "bindings/core/v8/SerializedScriptValueFactory.h"
39 #include "core/dom/Document.h" 40 #include "core/dom/Document.h"
40 #include "core/dom/ExceptionCode.h" 41 #include "core/dom/ExceptionCode.h"
41 #include "core/dom/ExecutionContext.h" 42 #include "core/dom/ExecutionContext.h"
42 #include "core/events/Event.h" 43 #include "core/events/Event.h"
43 #include "core/events/MessageEvent.h" 44 #include "core/events/MessageEvent.h"
44 #include "core/frame/LocalDOMWindow.h" 45 #include "core/frame/LocalDOMWindow.h"
45 #include "core/frame/LocalFrame.h" 46 #include "core/frame/LocalFrame.h"
46 #include "core/frame/csp/ContentSecurityPolicy.h" 47 #include "core/frame/csp/ContentSecurityPolicy.h"
47 #include "core/html/parser/TextResourceDecoder.h" 48 #include "core/html/parser/TextResourceDecoder.h"
48 #include "core/inspector/ConsoleMessage.h" 49 #include "core/inspector/ConsoleMessage.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 } 427 }
427 428
428 bool EventSource::hasPendingActivity() const 429 bool EventSource::hasPendingActivity() const
429 { 430 {
430 return m_state != CLOSED; 431 return m_state != CLOSED;
431 } 432 }
432 433
433 PassRefPtrWillBeRawPtr<MessageEvent> EventSource::createMessageEvent() 434 PassRefPtrWillBeRawPtr<MessageEvent> EventSource::createMessageEvent()
434 { 435 {
435 RefPtrWillBeRawPtr<MessageEvent> event = MessageEvent::create(); 436 RefPtrWillBeRawPtr<MessageEvent> event = MessageEvent::create();
436 event->initMessageEvent(m_eventName.isEmpty() ? EventTypeNames::message : m_ eventName, false, false, SerializedScriptValue::create(String(m_data)), m_eventS treamOrigin, m_lastEventId, 0, nullptr); 437 event->initMessageEvent(m_eventName.isEmpty() ? EventTypeNames::message : m_ eventName, false, false, SerializedScriptValueFactory::instance().create(String( m_data)), m_eventStreamOrigin, m_lastEventId, 0, nullptr);
437 m_data.clear(); 438 m_data.clear();
438 return event.release(); 439 return event.release();
439 } 440 }
440 441
441 } // namespace blink 442 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/MessagePort.cpp ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698