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

Side by Side Diff: src/wasm/wasm-objects.cc

Issue 2744613006: [object] Add Script::IsUserJavaScript(). (Closed)
Patch Set: Rebase. Created 3 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 | « src/objects-inl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/wasm/wasm-objects.h" 5 #include "src/wasm/wasm-objects.h"
6 #include "src/utils.h" 6 #include "src/utils.h"
7 7
8 #include "src/base/iterator.h" 8 #include "src/base/iterator.h"
9 #include "src/debug/debug-interface.h" 9 #include "src/debug/debug-interface.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 if (!asm_js_offset_table.is_null()) { 573 if (!asm_js_offset_table.is_null()) {
574 arr->set(kAsmJsOffsetTable, *asm_js_offset_table); 574 arr->set(kAsmJsOffsetTable, *asm_js_offset_table);
575 } 575 }
576 576
577 DCHECK(WasmSharedModuleData::IsWasmSharedModuleData(*arr)); 577 DCHECK(WasmSharedModuleData::IsWasmSharedModuleData(*arr));
578 return Handle<WasmSharedModuleData>::cast(arr); 578 return Handle<WasmSharedModuleData>::cast(arr);
579 } 579 }
580 580
581 bool WasmSharedModuleData::is_asm_js() { 581 bool WasmSharedModuleData::is_asm_js() {
582 bool asm_js = module()->origin == wasm::ModuleOrigin::kAsmJsOrigin; 582 bool asm_js = module()->origin == wasm::ModuleOrigin::kAsmJsOrigin;
583 DCHECK_EQ(asm_js, script()->type() == Script::TYPE_NORMAL); 583 DCHECK_EQ(asm_js, script()->IsUserJavaScript());
584 DCHECK_EQ(asm_js, has_asm_js_offset_table()); 584 DCHECK_EQ(asm_js, has_asm_js_offset_table());
585 return asm_js; 585 return asm_js;
586 } 586 }
587 587
588 void WasmSharedModuleData::ReinitializeAfterDeserialization( 588 void WasmSharedModuleData::ReinitializeAfterDeserialization(
589 Isolate* isolate, Handle<WasmSharedModuleData> shared) { 589 Isolate* isolate, Handle<WasmSharedModuleData> shared) {
590 DCHECK(shared->get(kModuleWrapper)->IsUndefined(isolate)); 590 DCHECK(shared->get(kModuleWrapper)->IsUndefined(isolate));
591 #ifdef DEBUG 591 #ifdef DEBUG
592 // No BreakpointInfo objects should survive deserialization. 592 // No BreakpointInfo objects should survive deserialization.
593 if (shared->has_breakpoint_infos()) { 593 if (shared->has_breakpoint_infos()) {
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 if (!array->get(kWrapperInstanceObject)->IsWeakCell()) return false; 1188 if (!array->get(kWrapperInstanceObject)->IsWeakCell()) return false;
1189 Isolate* isolate = array->GetIsolate(); 1189 Isolate* isolate = array->GetIsolate();
1190 if (!array->get(kNextInstanceWrapper)->IsUndefined(isolate) && 1190 if (!array->get(kNextInstanceWrapper)->IsUndefined(isolate) &&
1191 !array->get(kNextInstanceWrapper)->IsFixedArray()) 1191 !array->get(kNextInstanceWrapper)->IsFixedArray())
1192 return false; 1192 return false;
1193 if (!array->get(kPreviousInstanceWrapper)->IsUndefined(isolate) && 1193 if (!array->get(kPreviousInstanceWrapper)->IsUndefined(isolate) &&
1194 !array->get(kPreviousInstanceWrapper)->IsFixedArray()) 1194 !array->get(kPreviousInstanceWrapper)->IsFixedArray())
1195 return false; 1195 return false;
1196 return true; 1196 return true;
1197 } 1197 }
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698