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

Side by Side Diff: Source/bindings/v8/ScriptController.h

Issue 13575004: Apply script preprocessor to Web page scripts only. (Closed) Base URL: https://chromium.googlesource.com/external/WebKit_trimmed.git@master
Patch Set: Re-implment based on review Created 7 years, 7 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
OLDNEW
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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 bool executeIfJavaScriptURL(const KURL&, ShouldReplaceDocumentIfJavaScriptUR L shouldReplaceDocumentIfJavaScriptURL = ReplaceDocumentIfJavaScriptURL); 89 bool executeIfJavaScriptURL(const KURL&, ShouldReplaceDocumentIfJavaScriptUR L shouldReplaceDocumentIfJavaScriptURL = ReplaceDocumentIfJavaScriptURL);
90 90
91 // This function must be called from the main thread. It is safe to call it repeatedly. 91 // This function must be called from the main thread. It is safe to call it repeatedly.
92 static void initializeThreading(); 92 static void initializeThreading();
93 93
94 v8::Local<v8::Value> compileAndRunScript(const ScriptSourceCode&); 94 v8::Local<v8::Value> compileAndRunScript(const ScriptSourceCode&);
95 95
96 // Evaluate JavaScript in the main world. 96 // Evaluate JavaScript in the main world.
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 // Evaluate Web-origin JavaScript in the main world. (Not for system uses)
pfeldman 2013/05/29 15:03:52 Insert blank line above the comment. I think this
100 ScriptValue evaluateFromWebPage(const ScriptSourceCode&);
99 101
100 // Executes JavaScript in an isolated world. The script gets its own global scope, 102 // 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), 103 // 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. 104 // and its own wrappers for all DOM nodes and DOM constructors.
103 // 105 //
104 // If an isolated world with the specified ID already exists, it is reused. 106 // If an isolated world with the specified ID already exists, it is reused.
105 // Otherwise, a new world is created. 107 // Otherwise, a new world is created.
106 // 108 //
107 // FIXME: Get rid of extensionGroup here. 109 // FIXME: Get rid of extensionGroup here.
108 void evaluateInIsolatedWorld(int worldID, const Vector<ScriptSourceCode>& so urces, int extensionGroup, Vector<ScriptValue>* results); 110 void evaluateInIsolatedWorld(int worldID, const Vector<ScriptSourceCode>& so urces, int extensionGroup, Vector<ScriptValue>* results);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 // to calls on the destroyed window object, we return a proxy NPObject 196 // to calls on the destroyed window object, we return a proxy NPObject
195 // which wraps the underlying window object. The wrapped window object 197 // which wraps the underlying window object. The wrapped window object
196 // pointer in this object is cleared out when the window object is 198 // pointer in this object is cleared out when the window object is
197 // destroyed. 199 // destroyed.
198 NPObject* m_wrappedWindowScriptNPObject; 200 NPObject* m_wrappedWindowScriptNPObject;
199 }; 201 };
200 202
201 } // namespace WebCore 203 } // namespace WebCore
202 204
203 #endif // ScriptController_h 205 #endif // ScriptController_h
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/v8/ScriptController.cpp » ('j') | Source/core/dom/ScriptElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698