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

Unified Diff: src/conversions-inl.h

Issue 2106083002: Remove SealHandleScope from TryNumberToSize conversion (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/cctest/test-conversions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/conversions-inl.h
diff --git a/src/conversions-inl.h b/src/conversions-inl.h
index 730e6477cbee3e0fb781d692ec971d5a32b7ba36..5fe71e09d3cc49d79277d434c66fbcfbd26e3b55 100644
--- a/src/conversions-inl.h
+++ b/src/conversions-inl.h
@@ -133,7 +133,8 @@ int64_t NumberToInt64(Object* number) {
}
bool TryNumberToSize(Isolate* isolate, Object* number, size_t* result) {
- SealHandleScope shs(isolate);
+ // Do not create handles in this function! Don't use SealHandleScope because
+ // the function can be used concurrently.
if (number->IsSmi()) {
int value = Smi::cast(number)->value();
DCHECK(static_cast<unsigned>(Smi::kMaxValue) <=
« no previous file with comments | « no previous file | test/cctest/test-conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698