OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 Google 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 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // The caller must hold an execution context. | 97 // The caller must hold an execution context. |
98 ScriptValue evaluate(const ScriptSourceCode&); | 98 ScriptValue evaluate(const ScriptSourceCode&); |
99 | 99 |
100 // Executes JavaScript in an isolated world. The script gets its own global
scope, | 100 // Executes JavaScript in an isolated world. The script gets its own global
scope, |
101 // its own prototypes for intrinsic JavaScript objects (String, Array, and s
o-on), | 101 // its own prototypes for intrinsic JavaScript objects (String, Array, and s
o-on), |
102 // and its own wrappers for all DOM nodes and DOM constructors. | 102 // and its own wrappers for all DOM nodes and DOM constructors. |
103 // | 103 // |
104 // If an isolated world with the specified ID already exists, it is reused. | 104 // If an isolated world with the specified ID already exists, it is reused. |
105 // Otherwise, a new world is created. | 105 // Otherwise, a new world is created. |
106 // | 106 // |
107 // If the worldID is 0 or DOMWrapperWorld::uninitializedWorldId, a new world
is always created. | |
108 // | |
109 // FIXME: Get rid of extensionGroup here. | 107 // FIXME: Get rid of extensionGroup here. |
110 void evaluateInIsolatedWorld(int worldID, const Vector<ScriptSourceCode>& so
urces, int extensionGroup, Vector<ScriptValue>* results); | 108 void evaluateInIsolatedWorld(int worldID, const Vector<ScriptSourceCode>& so
urces, int extensionGroup, Vector<ScriptValue>* results); |
111 | 109 |
112 // Returns true if the current world is isolated, and has its own Content | 110 // Returns true if the current world is isolated, and has its own Content |
113 // Security Policy. In this case, the policy of the main world should be | 111 // Security Policy. In this case, the policy of the main world should be |
114 // ignored when evaluating resources injected into the DOM. | 112 // ignored when evaluating resources injected into the DOM. |
115 bool shouldBypassMainWorldContentSecurityPolicy(); | 113 bool shouldBypassMainWorldContentSecurityPolicy(); |
116 | 114 |
117 // FIXME: Remove references to this call in chromium and delete it. | 115 // FIXME: Remove references to this call in chromium and delete it. |
118 inline static void setIsolatedWorldSecurityOrigin(int worldID, PassRefPtr<Se
curityOrigin> origin) | 116 inline static void setIsolatedWorldSecurityOrigin(int worldID, PassRefPtr<Se
curityOrigin> origin) |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 // destroyed. | 219 // destroyed. |
222 NPObject* m_wrappedWindowScriptNPObject; | 220 NPObject* m_wrappedWindowScriptNPObject; |
223 | 221 |
224 // All of the extensions registered with the context. | 222 // All of the extensions registered with the context. |
225 static V8Extensions m_extensions; | 223 static V8Extensions m_extensions; |
226 }; | 224 }; |
227 | 225 |
228 } // namespace WebCore | 226 } // namespace WebCore |
229 | 227 |
230 #endif // ScriptController_h | 228 #endif // ScriptController_h |
OLD | NEW |