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

Unified Diff: src/objects.cc

Issue 7247013: Fix three GC unsafe places found by gcmole's dead_vars analysis. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index eafea57101e3e7e320cb7d0fcfd77e54d094e893..92a2ed49444156801bf0a673adfcd5a36a06d52d 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -2233,7 +2233,7 @@ MUST_USE_RESULT MaybeObject* JSProxy::SetPropertyWithHandler(
Execution::Call(trap, handler, ARRAY_SIZE(args), args, &has_exception);
if (has_exception) return Failure::Exception();
- return value_raw;
+ return *value;
}
@@ -3065,8 +3065,9 @@ MaybeObject* JSObject::DeleteDictionaryElement(uint32_t index,
// In strict mode, attempting to delete a non-configurable property
// throws an exception.
HandleScope scope(isolate);
+ Handle<Object> holder(this);
Handle<Object> name = isolate->factory()->NewNumberFromUint(index);
- Handle<Object> args[2] = { name, Handle<Object>(this) };
+ Handle<Object> args[2] = { name, holder };
Handle<Object> error =
isolate->factory()->NewTypeError("strict_delete_property",
HandleVector(args, 2));
@@ -8334,8 +8335,8 @@ MaybeObject* JSObject::SetDictionaryElement(uint32_t index,
dictionary->UpdateMaxNumberKey(index);
// If put fails in strict mode, throw an exception.
if (!dictionary->ValueAtPut(entry, value) && strict_mode == kStrictMode) {
- Handle<Object> number = isolate->factory()->NewNumberFromUint(index);
Handle<Object> holder(this);
+ Handle<Object> number = isolate->factory()->NewNumberFromUint(index);
Handle<Object> args[2] = { number, holder };
Handle<Object> error =
isolate->factory()->NewTypeError("strict_read_only_property",
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698