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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 return v8::Local<v8::Object>(); 358 return v8::Local<v8::Object>();
359 auto result = map.find(info); 359 auto result = map.find(info);
360 if (result == map.end()) 360 if (result == map.end())
361 return v8::Local<v8::Object>(); 361 return v8::Local<v8::Object>();
362 v8::Local<v8::FunctionTemplate> templ = result->value.Get(isolate()); 362 v8::Local<v8::FunctionTemplate> templ = result->value.Get(isolate());
363 return v8::Local<v8::Object>::Cast(value)->FindInstanceInPrototypeChain( 363 return v8::Local<v8::Object>::Cast(value)->FindInstanceInPrototypeChain(
364 templ); 364 templ);
365 } 365 }
366 366
367 void V8PerIsolateData::addEndOfScopeTask(std::unique_ptr<EndOfScopeTask> task) { 367 void V8PerIsolateData::addEndOfScopeTask(std::unique_ptr<EndOfScopeTask> task) {
368 m_endOfScopeTasks.append(std::move(task)); 368 m_endOfScopeTasks.push_back(std::move(task));
369 } 369 }
370 370
371 void V8PerIsolateData::runEndOfScopeTasks() { 371 void V8PerIsolateData::runEndOfScopeTasks() {
372 Vector<std::unique_ptr<EndOfScopeTask>> tasks; 372 Vector<std::unique_ptr<EndOfScopeTask>> tasks;
373 tasks.swap(m_endOfScopeTasks); 373 tasks.swap(m_endOfScopeTasks);
374 for (const auto& task : tasks) 374 for (const auto& task : tasks)
375 task->run(); 375 task->run();
376 ASSERT(m_endOfScopeTasks.isEmpty()); 376 ASSERT(m_endOfScopeTasks.isEmpty());
377 } 377 }
378 378
(...skipping 13 matching lines...) Expand all
392 392
393 void V8PerIsolateData::addActiveScriptWrappable( 393 void V8PerIsolateData::addActiveScriptWrappable(
394 ActiveScriptWrappable* wrappable) { 394 ActiveScriptWrappable* wrappable) {
395 if (!m_activeScriptWrappables) 395 if (!m_activeScriptWrappables)
396 m_activeScriptWrappables = new ActiveScriptWrappableSet(); 396 m_activeScriptWrappables = new ActiveScriptWrappableSet();
397 397
398 m_activeScriptWrappables->add(wrappable); 398 m_activeScriptWrappables->add(wrappable);
399 } 399 }
400 400
401 } // namespace blink 401 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698