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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp

Issue 2554693003: Migrate WTF::Vector::append() to ::push_back() [part 1 of N] (Closed)
Patch Set: rebase Created 4 years 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 * 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698