OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // Returns true if the embedder should stop calling idleNotification | 75 // Returns true if the embedder should stop calling idleNotification |
76 // until real work has been done. | 76 // until real work has been done. |
77 bool idleNotification() { return m_isolate->IdleNotification(1000); } | 77 bool idleNotification() { return m_isolate->IdleNotification(1000); } |
78 | 78 |
79 // Used by Inspector agents: | 79 // Used by Inspector agents: |
80 ScriptState* scriptState() { return m_scriptState.get(); } | 80 ScriptState* scriptState() { return m_scriptState.get(); } |
81 | 81 |
82 // Used by V8 bindings: | 82 // Used by V8 bindings: |
83 v8::Local<v8::Context> context() { return m_scriptState ? m_scriptState->con
text() : v8::Local<v8::Context>(); } | 83 v8::Local<v8::Context> context() { return m_scriptState ? m_scriptState->con
text() : v8::Local<v8::Context>(); } |
84 | 84 |
| 85 v8::Isolate* isolate() { return m_isolate; } |
| 86 |
85 private: | 87 private: |
86 class WorkerGlobalScopeExecutionState; | 88 class WorkerGlobalScopeExecutionState; |
87 | 89 |
88 bool isContextInitialized() { return m_scriptState && !!m_scriptState->perCo
ntextData(); } | 90 bool isContextInitialized() { return m_scriptState && !!m_scriptState->perCo
ntextData(); } |
89 | 91 |
90 // Evaluate a script file in the current execution environment. | 92 // Evaluate a script file in the current execution environment. |
91 ScriptValue evaluate(const String& script, const String& fileName, const Tex
tPosition& scriptStartPosition); | 93 ScriptValue evaluate(const String& script, const String& fileName, const Tex
tPosition& scriptStartPosition); |
92 | 94 |
93 v8::Isolate* m_isolate; | 95 v8::Isolate* m_isolate; |
94 WorkerGlobalScope& m_workerGlobalScope; | 96 WorkerGlobalScope& m_workerGlobalScope; |
(...skipping 11 matching lines...) Expand all Loading... |
106 // Oilpan enabled; stack scanning will visit the object and | 108 // Oilpan enabled; stack scanning will visit the object and |
107 // trace its on-heap fields. | 109 // trace its on-heap fields. |
108 GC_PLUGIN_IGNORE("394615") | 110 GC_PLUGIN_IGNORE("394615") |
109 WorkerGlobalScopeExecutionState* m_globalScopeExecutionState; | 111 WorkerGlobalScopeExecutionState* m_globalScopeExecutionState; |
110 OwnPtr<V8IsolateInterruptor> m_interruptor; | 112 OwnPtr<V8IsolateInterruptor> m_interruptor; |
111 }; | 113 }; |
112 | 114 |
113 } // namespace blink | 115 } // namespace blink |
114 | 116 |
115 #endif // WorkerScriptController_h | 117 #endif // WorkerScriptController_h |
OLD | NEW |