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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 class ScriptSourceCode; | 45 class ScriptSourceCode; |
46 class WorkerGlobalScope; | 46 class WorkerGlobalScope; |
47 | 47 |
48 class WorkerScriptController { | 48 class WorkerScriptController { |
49 public: | 49 public: |
50 explicit WorkerScriptController(WorkerGlobalScope&); | 50 explicit WorkerScriptController(WorkerGlobalScope&); |
51 ~WorkerScriptController(); | 51 ~WorkerScriptController(); |
52 | 52 |
53 bool isExecutionForbidden() const; | 53 bool isExecutionForbidden() const; |
54 bool isExecutionTerminating() const; | 54 bool isExecutionTerminating() const; |
55 void evaluate(const ScriptSourceCode&, RefPtrWillBeRawPtr<ErrorEvent>* = 0); | 55 |
| 56 // Returns true if the evaluation completed with no uncaught exception. |
| 57 bool evaluate(const ScriptSourceCode&, RefPtrWillBeRawPtr<ErrorEvent>* = 0); |
56 | 58 |
57 // Prevents future JavaScript execution. See | 59 // Prevents future JavaScript execution. See |
58 // scheduleExecutionTermination, isExecutionForbidden. | 60 // scheduleExecutionTermination, isExecutionForbidden. |
59 void forbidExecution(); | 61 void forbidExecution(); |
60 | 62 |
61 // Used by WorkerThread: | 63 // Used by WorkerThread: |
62 bool initializeContextIfNeeded(); | 64 bool initializeContextIfNeeded(); |
63 // Async request to terminate future JavaScript execution on the | 65 // Async request to terminate future JavaScript execution on the |
64 // worker thread. JavaScript evaluation exits with a | 66 // worker thread. JavaScript evaluation exits with a |
65 // non-continuable exception and WorkerScriptController calls | 67 // non-continuable exception and WorkerScriptController calls |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |