| 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 * Copyright (C) 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions are | 7 * modification, are permitted provided that the following conditions are |
| 8 * met: | 8 * met: |
| 9 * | 9 * |
| 10 * * Redistributions of source code must retain the above copyright | 10 * * Redistributions of source code must retain the above copyright |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 return extensions; | 230 return extensions; |
| 231 } | 231 } |
| 232 | 232 |
| 233 void ScriptController::registerExtensionIfNeeded(v8::Extension* extension) { | 233 void ScriptController::registerExtensionIfNeeded(v8::Extension* extension) { |
| 234 const V8Extensions& extensions = registeredExtensions(); | 234 const V8Extensions& extensions = registeredExtensions(); |
| 235 for (size_t i = 0; i < extensions.size(); ++i) { | 235 for (size_t i = 0; i < extensions.size(); ++i) { |
| 236 if (extensions[i] == extension) | 236 if (extensions[i] == extension) |
| 237 return; | 237 return; |
| 238 } | 238 } |
| 239 v8::RegisterExtension(extension); | 239 v8::RegisterExtension(extension); |
| 240 registeredExtensions().append(extension); | 240 registeredExtensions().push_back(extension); |
| 241 } | 241 } |
| 242 | 242 |
| 243 void ScriptController::clearWindowProxy() { | 243 void ScriptController::clearWindowProxy() { |
| 244 // V8 binding expects ScriptController::clearWindowProxy only be called when a | 244 // V8 binding expects ScriptController::clearWindowProxy only be called when a |
| 245 // frame is loading a new page. This creates a new context for the new page. | 245 // frame is loading a new page. This creates a new context for the new page. |
| 246 m_windowProxyManager->clearForNavigation(); | 246 m_windowProxyManager->clearForNavigation(); |
| 247 MainThreadDebugger::instance()->didClearContextsForFrame(frame()); | 247 MainThreadDebugger::instance()->didClearContextsForFrame(frame()); |
| 248 } | 248 } |
| 249 | 249 |
| 250 void ScriptController::updateDocument() { | 250 void ScriptController::updateDocument() { |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 if (!v8CallBoolean(resultArray->CreateDataProperty(scriptState->context(), | 440 if (!v8CallBoolean(resultArray->CreateDataProperty(scriptState->context(), |
| 441 i, evaluationResult))) | 441 i, evaluationResult))) |
| 442 return; | 442 return; |
| 443 } | 443 } |
| 444 | 444 |
| 445 if (results) { | 445 if (results) { |
| 446 for (size_t i = 0; i < resultArray->Length(); ++i) { | 446 for (size_t i = 0; i < resultArray->Length(); ++i) { |
| 447 v8::Local<v8::Value> value; | 447 v8::Local<v8::Value> value; |
| 448 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) | 448 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) |
| 449 return; | 449 return; |
| 450 results->append(value); | 450 results->push_back(value); |
| 451 } | 451 } |
| 452 } | 452 } |
| 453 } | 453 } |
| 454 | 454 |
| 455 } // namespace blink | 455 } // namespace blink |
| OLD | NEW |