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

Side by Side Diff: src/bootstrapper.cc

Issue 848023002: Store embed-script flag as metadata into snapshot blob. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 months 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 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project 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 "src/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/extensions/externalize-string-extension.h" 9 #include "src/extensions/externalize-string-extension.h"
10 #include "src/extensions/free-buffer-extension.h" 10 #include "src/extensions/free-buffer-extension.h"
(...skipping 2560 matching lines...) Expand 10 before | Expand all | Expand 10 after
2571 isolate()->clear_pending_exception(); 2571 isolate()->clear_pending_exception();
2572 return false; 2572 return false;
2573 } 2573 }
2574 TransferObject(obj, object); 2574 TransferObject(obj, object);
2575 return true; 2575 return true;
2576 } 2576 }
2577 2577
2578 2578
2579 void Genesis::TransferNamedProperties(Handle<JSObject> from, 2579 void Genesis::TransferNamedProperties(Handle<JSObject> from,
2580 Handle<JSObject> to) { 2580 Handle<JSObject> to) {
2581 // If JSObject::AddProperty asserts due to already existing property,
2582 // it is likely due to both global objects sharing property name(s).
2583 // Merging those two global objects is impossible.
2584 // The global template must not create properties that already exist
2585 // in the snapshotted global object.
2581 if (from->HasFastProperties()) { 2586 if (from->HasFastProperties()) {
2582 Handle<DescriptorArray> descs = 2587 Handle<DescriptorArray> descs =
2583 Handle<DescriptorArray>(from->map()->instance_descriptors()); 2588 Handle<DescriptorArray>(from->map()->instance_descriptors());
2584 for (int i = 0; i < from->map()->NumberOfOwnDescriptors(); i++) { 2589 for (int i = 0; i < from->map()->NumberOfOwnDescriptors(); i++) {
2585 PropertyDetails details = descs->GetDetails(i); 2590 PropertyDetails details = descs->GetDetails(i);
2586 switch (details.type()) { 2591 switch (details.type()) {
2587 case FIELD: { 2592 case FIELD: {
2588 HandleScope inner(isolate()); 2593 HandleScope inner(isolate());
2589 Handle<Name> key = Handle<Name>(descs->GetKey(i)); 2594 Handle<Name> key = Handle<Name>(descs->GetKey(i));
2590 FieldIndex index = FieldIndex::ForDescriptor(from->map(), i); 2595 FieldIndex index = FieldIndex::ForDescriptor(from->map(), i);
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
2851 return from + sizeof(NestingCounterType); 2856 return from + sizeof(NestingCounterType);
2852 } 2857 }
2853 2858
2854 2859
2855 // Called when the top-level V8 mutex is destroyed. 2860 // Called when the top-level V8 mutex is destroyed.
2856 void Bootstrapper::FreeThreadResources() { 2861 void Bootstrapper::FreeThreadResources() {
2857 DCHECK(!IsActive()); 2862 DCHECK(!IsActive());
2858 } 2863 }
2859 2864
2860 } } // namespace v8::internal 2865 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/heap/spaces.cc » ('j') | src/snapshot-external.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698