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

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

Issue 2132553002: [wasm] Use handles in wasm::GetDebugInfo. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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
« src/frames.cc ('K') | « src/wasm/wasm-module.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/base/atomic-utils.h" 5 #include "src/base/atomic-utils.h"
6 #include "src/macro-assembler.h" 6 #include "src/macro-assembler.h"
7 #include "src/objects.h" 7 #include "src/objects.h"
8 #include "src/property-descriptor.h" 8 #include "src/property-descriptor.h"
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 } 1271 }
1272 return true; 1272 return true;
1273 } 1273 }
1274 return false; 1274 return false;
1275 } 1275 }
1276 1276
1277 SeqOneByteString* GetWasmBytes(JSObject* wasm) { 1277 SeqOneByteString* GetWasmBytes(JSObject* wasm) {
1278 return SeqOneByteString::cast(wasm->GetInternalField(kWasmModuleBytesString)); 1278 return SeqOneByteString::cast(wasm->GetInternalField(kWasmModuleBytesString));
1279 } 1279 }
1280 1280
1281 WasmDebugInfo* GetDebugInfo(JSObject* wasm) { 1281 Handle<WasmDebugInfo> GetDebugInfo(Handle<JSObject> wasm) {
1282 Object* info = wasm->GetInternalField(kWasmDebugInfo); 1282 Handle<Object> info(wasm->GetInternalField(kWasmDebugInfo),
1283 if (!info->IsUndefined(wasm->GetIsolate())) return WasmDebugInfo::cast(info); 1283 wasm->GetIsolate());
1284 Handle<WasmDebugInfo> new_info = WasmDebugInfo::New(handle(wasm)); 1284 if (!info->IsUndefined(wasm->GetIsolate()))
1285 return Handle<WasmDebugInfo>::cast(info);
1286 Handle<WasmDebugInfo> new_info = WasmDebugInfo::New(wasm);
1285 wasm->SetInternalField(kWasmDebugInfo, *new_info); 1287 wasm->SetInternalField(kWasmDebugInfo, *new_info);
1286 return *new_info; 1288 return new_info;
1287 } 1289 }
1288 1290
1289 bool UpdateWasmModuleMemory(Handle<JSObject> object, Address old_start, 1291 bool UpdateWasmModuleMemory(Handle<JSObject> object, Address old_start,
1290 Address new_start, uint32_t old_size, 1292 Address new_start, uint32_t old_size,
1291 uint32_t new_size) { 1293 uint32_t new_size) {
1292 DisallowHeapAllocation no_allocation; 1294 DisallowHeapAllocation no_allocation;
1293 if (!IsWasmObject(*object)) { 1295 if (!IsWasmObject(*object)) {
1294 return false; 1296 return false;
1295 } 1297 }
1296 1298
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 return static_cast<int32_t>(HeapNumber::cast(*result)->value()); 1395 return static_cast<int32_t>(HeapNumber::cast(*result)->value());
1394 } 1396 }
1395 thrower.Error("WASM.compileRun() failed: Return value should be number"); 1397 thrower.Error("WASM.compileRun() failed: Return value should be number");
1396 return -1; 1398 return -1;
1397 } 1399 }
1398 1400
1399 } // namespace testing 1401 } // namespace testing
1400 } // namespace wasm 1402 } // namespace wasm
1401 } // namespace internal 1403 } // namespace internal
1402 } // namespace v8 1404 } // namespace v8
OLDNEW
« src/frames.cc ('K') | « src/wasm/wasm-module.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698