OLD | NEW |
1 // Copyright 2008, Google Inc. | 1 // Copyright 2008, Google Inc. |
2 // All rights reserved. | 2 // 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 are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * 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 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 void attachDebugger(void*); | 191 void attachDebugger(void*); |
192 | 192 |
193 // Create a NPObject wrapper for a JSObject | 193 // Create a NPObject wrapper for a JSObject |
194 // NPObject *WrapScriptObject(NPP pluginId, JSObject* objectToWrap, | 194 // NPObject *WrapScriptObject(NPP pluginId, JSObject* objectToWrap, |
195 // JSRootObject* originRootObject, | 195 // JSRootObject* originRootObject, |
196 // JSRootObject* rootObject); | 196 // JSRootObject* rootObject); |
197 | 197 |
198 // --- Static methods assume we are running VM in single thread, --- | 198 // --- Static methods assume we are running VM in single thread, --- |
199 // --- and there is only one VM instance. --- | 199 // --- and there is only one VM instance. --- |
200 | 200 |
201 // Returns the frame of the calling code is in. | 201 // Returns the frame for the entered context. See comments in |
202 // Not necessary the frame of this proxy. | 202 // V8Proxy::retrieveFrameForEnteredContext() for more information. |
203 // For example, JS code in frame A calls windowB.open(...). | 203 static Frame* retrieveFrameForEnteredContext(); |
204 // Window::open method has the frame pointer of B, but | 204 |
205 // the execution context is in frame A, so it needs | 205 // Returns the frame for the current context. See comments in |
206 // frame A's loader to complete URL. | 206 // V8Proxy::retrieveFrameForEnteredContext() for more information. |
207 static Frame* retrieveActiveFrame(); | 207 static Frame* retrieveFrameForCurrentContext(); |
208 | 208 |
209 // Check whether it is safe to access a frame in another domain. | 209 // Check whether it is safe to access a frame in another domain. |
210 static bool isSafeScript(Frame* target); | 210 static bool isSafeScript(Frame* target); |
211 | 211 |
212 // Pass command-line flags to the JS engine | 212 // Pass command-line flags to the JS engine |
213 static void setFlags(const char* str, int length); | 213 static void setFlags(const char* str, int length); |
214 | 214 |
215 // Protect and unprotect the JS wrapper from garbage collected. | 215 // Protect and unprotect the JS wrapper from garbage collected. |
216 static void gcProtectJSWrapper(void* object); | 216 static void gcProtectJSWrapper(void* object); |
217 static void gcUnprotectJSWrapper(void* object); | 217 static void gcUnprotectJSWrapper(void* object); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 // The frame keeps a NPObject reference for each item on the list. | 257 // The frame keeps a NPObject reference for each item on the list. |
258 PluginObjectMap m_pluginObjects; | 258 PluginObjectMap m_pluginObjects; |
259 #if ENABLE(NETSCAPE_PLUGIN_API) | 259 #if ENABLE(NETSCAPE_PLUGIN_API) |
260 NPObject* m_windowScriptNPObject; | 260 NPObject* m_windowScriptNPObject; |
261 #endif | 261 #endif |
262 }; | 262 }; |
263 | 263 |
264 } // namespace WebCore | 264 } // namespace WebCore |
265 | 265 |
266 #endif // ScriptController_h | 266 #endif // ScriptController_h |
OLD | NEW |