OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007-2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2007-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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 V8ScriptRunner::callFunction( | 124 V8ScriptRunner::callFunction( |
125 function, frame->document(), m_scriptState->context()->Global(), | 125 function, frame->document(), m_scriptState->context()->Global(), |
126 info.size(), info.data(), m_scriptState->isolate()); | 126 info.size(), info.data(), m_scriptState->isolate()); |
127 } else { | 127 } else { |
128 DVLOG(1) << "ScheduledAction::execute " << this | 128 DVLOG(1) << "ScheduledAction::execute " << this |
129 << ": executing from source"; | 129 << ": executing from source"; |
130 frame->script().executeScriptAndReturnValue(m_scriptState->context(), | 130 frame->script().executeScriptAndReturnValue(m_scriptState->context(), |
131 ScriptSourceCode(m_code)); | 131 ScriptSourceCode(m_code)); |
132 } | 132 } |
133 | 133 |
134 // The frame might be invalid at this point because JavaScript could have rele
ased it. | 134 // The frame might be invalid at this point because JavaScript could have |
| 135 // released it. |
135 } | 136 } |
136 | 137 |
137 void ScheduledAction::execute(WorkerGlobalScope* worker) { | 138 void ScheduledAction::execute(WorkerGlobalScope* worker) { |
138 ASSERT(worker->thread()->isCurrentThread()); | 139 ASSERT(worker->thread()->isCurrentThread()); |
139 | 140 |
140 if (!m_scriptState->contextIsValid()) { | 141 if (!m_scriptState->contextIsValid()) { |
141 DVLOG(1) << "ScheduledAction::execute " << this << ": context is empty"; | 142 DVLOG(1) << "ScheduledAction::execute " << this << ": context is empty"; |
142 return; | 143 return; |
143 } | 144 } |
144 | 145 |
(...skipping 19 matching lines...) Expand all Loading... |
164 } | 165 } |
165 | 166 |
166 void ScheduledAction::createLocalHandlesForArgs( | 167 void ScheduledAction::createLocalHandlesForArgs( |
167 Vector<v8::Local<v8::Value>>* handles) { | 168 Vector<v8::Local<v8::Value>>* handles) { |
168 handles->reserveCapacity(m_info.Size()); | 169 handles->reserveCapacity(m_info.Size()); |
169 for (size_t i = 0; i < m_info.Size(); ++i) | 170 for (size_t i = 0; i < m_info.Size(); ++i) |
170 handles->append(m_info.Get(i)); | 171 handles->append(m_info.Get(i)); |
171 } | 172 } |
172 | 173 |
173 } // namespace blink | 174 } // namespace blink |
OLD | NEW |