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

Side by Side Diff: net/proxy/proxy_resolver_v8.cc

Issue 1491083002: Set V8 extras mode in gin::V8Initializer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « mojo/edk/js/tests/js_to_cpp_tests.cc ('k') | pdf/pdfium/pdfium_engine.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/proxy/proxy_resolver_v8.h" 5 #include "net/proxy/proxy_resolver_v8.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstdio> 8 #include <cstdio>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 if (!holder_) { 367 if (!holder_) {
368 // Do one-time initialization for V8. 368 // Do one-time initialization for V8.
369 if (!has_initialized_v8_) { 369 if (!has_initialized_v8_) {
370 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 370 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
371 gin::V8Initializer::LoadV8Snapshot(); 371 gin::V8Initializer::LoadV8Snapshot();
372 gin::V8Initializer::LoadV8Natives(); 372 gin::V8Initializer::LoadV8Natives();
373 #endif 373 #endif
374 374
375 gin::IsolateHolder::Initialize( 375 gin::IsolateHolder::Initialize(
376 gin::IsolateHolder::kNonStrictMode, 376 gin::IsolateHolder::kNonStrictMode,
377 gin::IsolateHolder::kStableV8Extras,
377 gin::ArrayBufferAllocator::SharedInstance()); 378 gin::ArrayBufferAllocator::SharedInstance());
378 379
379 has_initialized_v8_ = true; 380 has_initialized_v8_ = true;
380 } 381 }
381 382
382 holder_.reset(new gin::IsolateHolder(gin::IsolateHolder::kUseLocker)); 383 holder_.reset(new gin::IsolateHolder(gin::IsolateHolder::kUseLocker));
383 } 384 }
384 385
385 return holder_->isolate(); 386 return holder_->isolate();
386 } 387 }
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 return 0; 880 return 0;
880 881
881 v8::Locker locked(isolate); 882 v8::Locker locked(isolate);
882 v8::Isolate::Scope isolate_scope(isolate); 883 v8::Isolate::Scope isolate_scope(isolate);
883 v8::HeapStatistics heap_statistics; 884 v8::HeapStatistics heap_statistics;
884 isolate->GetHeapStatistics(&heap_statistics); 885 isolate->GetHeapStatistics(&heap_statistics);
885 return heap_statistics.used_heap_size(); 886 return heap_statistics.used_heap_size();
886 } 887 }
887 888
888 } // namespace net 889 } // namespace net
OLDNEW
« no previous file with comments | « mojo/edk/js/tests/js_to_cpp_tests.cc ('k') | pdf/pdfium/pdfium_engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698