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

Side by Side Diff: Source/core/dom/MessagePort.h

Issue 924983002: Expose v8 context a MessagePort lives in to give content side code a valid context to (de)serialize… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 months 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 | « no previous file | Source/core/dom/MessagePort.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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // A port gets neutered when it is transferred to a new owner via postMessag e(). 105 // A port gets neutered when it is transferred to a new owner via postMessag e().
106 bool isNeutered() const { return !m_entangledChannel; } 106 bool isNeutered() const { return !m_entangledChannel; }
107 107
108 virtual void trace(Visitor*) override; 108 virtual void trace(Visitor*) override;
109 109
110 private: 110 private:
111 explicit MessagePort(ExecutionContext&); 111 explicit MessagePort(ExecutionContext&);
112 112
113 // WebMessagePortChannelClient implementation. 113 // WebMessagePortChannelClient implementation.
114 virtual void messageAvailable() override; 114 virtual void messageAvailable() override;
115 virtual v8::Isolate* scriptIsolate() override;
116 virtual v8::Handle<v8::Context> scriptContext() override;
adamk 2015/02/18 02:01:21 Exposing a Context like this through the API worri
115 void dispatchMessages(); 117 void dispatchMessages();
116 118
117 OwnPtr<WebMessagePortChannel> m_entangledChannel; 119 OwnPtr<WebMessagePortChannel> m_entangledChannel;
118 120
119 bool m_started; 121 bool m_started;
120 bool m_closed; 122 bool m_closed;
121 123
122 WeakPtrFactory<MessagePort> m_weakFactory; 124 WeakPtrFactory<MessagePort> m_weakFactory;
123 }; 125 };
124 126
125 } // namespace blink 127 } // namespace blink
126 128
127 #endif // MessagePort_h 129 #endif // MessagePort_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/MessagePort.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698