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

Side by Side Diff: src/snapshot/serialize.cc

Issue 1750573002: [interpreter] Fix test-serialize/SerializeToplevelIsolates. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | test/cctest/cctest.status » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/snapshot/serialize.h" 5 #include "src/snapshot/serialize.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 2614 matching lines...) Expand 10 before | Expand all | Expand 10 after
2625 } 2625 }
2626 result->set_deserialized(true); 2626 result->set_deserialized(true);
2627 2627
2628 if (isolate->logger()->is_logging_code_events() || 2628 if (isolate->logger()->is_logging_code_events() ||
2629 isolate->cpu_profiler()->is_profiling()) { 2629 isolate->cpu_profiler()->is_profiling()) {
2630 String* name = isolate->heap()->empty_string(); 2630 String* name = isolate->heap()->empty_string();
2631 if (result->script()->IsScript()) { 2631 if (result->script()->IsScript()) {
2632 Script* script = Script::cast(result->script()); 2632 Script* script = Script::cast(result->script());
2633 if (script->name()->IsString()) name = String::cast(script->name()); 2633 if (script->name()->IsString()) name = String::cast(script->name());
2634 } 2634 }
2635 isolate->logger()->CodeCreateEvent(Logger::SCRIPT_TAG, 2635 isolate->logger()->CodeCreateEvent(
2636 AbstractCode::cast(result->code()), 2636 Logger::SCRIPT_TAG, result->abstract_code(), *result, NULL, name);
2637 *result, NULL, name);
2638 } 2637 }
2639 return scope.CloseAndEscape(result); 2638 return scope.CloseAndEscape(result);
2640 } 2639 }
2641 2640
2642 2641
2643 void SerializedData::AllocateData(int size) { 2642 void SerializedData::AllocateData(int size) {
2644 DCHECK(!owns_data_); 2643 DCHECK(!owns_data_);
2645 data_ = NewArray<byte>(size); 2644 data_ = NewArray<byte>(size);
2646 size_ = size; 2645 size_ = size;
2647 owns_data_ = true; 2646 owns_data_ = true;
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
2866 SerializedCodeData* scd = new SerializedCodeData(cached_data); 2865 SerializedCodeData* scd = new SerializedCodeData(cached_data);
2867 SanityCheckResult r = scd->SanityCheck(isolate, source); 2866 SanityCheckResult r = scd->SanityCheck(isolate, source);
2868 if (r == CHECK_SUCCESS) return scd; 2867 if (r == CHECK_SUCCESS) return scd;
2869 cached_data->Reject(); 2868 cached_data->Reject();
2870 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); 2869 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r);
2871 delete scd; 2870 delete scd;
2872 return NULL; 2871 return NULL;
2873 } 2872 }
2874 } // namespace internal 2873 } // namespace internal
2875 } // namespace v8 2874 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698