Commit 41acd51b authored by verwaest's avatar verwaest Committed by Commit bot

Remove now-dead DefineDataPropertyUnchecked

BUG=

Review URL: https://codereview.chromium.org/1926493003

Cr-Commit-Position: refs/heads/master@{#35823}
parent f95e130b
......@@ -833,34 +833,6 @@ RUNTIME_FUNCTION(Runtime_DefineAccessorPropertyUnchecked) {
}
// Implements part of 8.12.9 DefineOwnProperty.
// There are 3 cases that lead here:
// Step 4a - define a new data property.
// Steps 9b & 12 - replace an existing accessor property with a data property.
// Step 12 - update an existing data property with a data or generic
// descriptor.
RUNTIME_FUNCTION(Runtime_DefineDataPropertyUnchecked) {
HandleScope scope(isolate);
DCHECK(args.length() == 4);
CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
CONVERT_ARG_HANDLE_CHECKED(Object, value, 2);
CONVERT_PROPERTY_ATTRIBUTES_CHECKED(attrs, 3);
LookupIterator it = LookupIterator::PropertyOrElement(
isolate, object, name, object, LookupIterator::OWN);
if (it.state() == LookupIterator::ACCESS_CHECK && !it.HasAccess()) {
return isolate->heap()->undefined_value();
}
Handle<Object> result;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, result, JSObject::DefineOwnPropertyIgnoreAttributes(
&it, value, attrs, JSObject::DONT_FORCE_FIELD));
return *result;
}
RUNTIME_FUNCTION(Runtime_DefineDataPropertyInLiteral) {
HandleScope scope(isolate);
DCHECK(args.length() == 5);
......
......@@ -408,7 +408,6 @@ namespace internal {
F(TryMigrateInstance, 1, 1) \
F(IsJSGlobalProxy, 1, 1) \
F(DefineAccessorPropertyUnchecked, 5, 1) \
F(DefineDataPropertyUnchecked, 4, 1) \
F(DefineDataPropertyInLiteral, 5, 1) \
F(GetDataProperty, 2, 1) \
F(HasFastPackedElements, 1, 1) \
......
......@@ -441,8 +441,7 @@ try {
}
// Test runtime calls to DefineDataPropertyUnchecked and
// DefineAccessorPropertyUnchecked - make sure we don't
// Test runtime calls to DefineAccessorPropertyUnchecked - make sure we don't
// crash.
try {
%DefineAccessorPropertyUnchecked(0, 0, 0, 0, 0);
......@@ -450,30 +449,12 @@ try {
assertTrue(/illegal access/.test(e));
}
try {
%DefineDataPropertyUnchecked(0, 0, 0, 0);
} catch (e) {
assertTrue(/illegal access/.test(e));
}
try {
%DefineDataPropertyUnchecked(null, null, null, null);
} catch (e) {
assertTrue(/illegal access/.test(e));
}
try {
%DefineAccessorPropertyUnchecked(null, null, null, null, null);
} catch (e) {
assertTrue(/illegal access/.test(e));
}
try {
%DefineDataPropertyUnchecked({}, null, null, null);
} catch (e) {
assertTrue(/illegal access/.test(e));
}
// Defining properties null should fail even when we have
// other allowed values
try {
......@@ -482,12 +463,6 @@ try {
assertTrue(/illegal access/.test(e));
}
try {
%DefineDataPropertyUnchecked(null, 'foo', 0, 0);
} catch (e) {
assertTrue(/illegal access/.test(e));
}
// Test that all possible differences in step 6 in DefineOwnProperty are
// exercised, i.e., any difference in the given property descriptor and the
// existing properties should not return true, but throw an error if the
......
......@@ -467,8 +467,7 @@ try {
}
// Test runtime calls to DefineDataPropertyUnchecked and
// DefineAccessorPropertyUnchecked - make sure we don't
// Test runtime calls to DefineAccessorPropertyUnchecked - make sure we don't
// crash.
try {
%DefineAccessorPropertyUnchecked(0, 0, 0, 0, 0);
......@@ -476,30 +475,12 @@ try {
assertTrue(/illegal access/.test(e));
}
try {
%DefineDataPropertyUnchecked(0, 0, 0, 0);
} catch (e) {
assertTrue(/illegal access/.test(e));
}
try {
%DefineDataPropertyUnchecked(null, null, null, null);
} catch (e) {
assertTrue(/illegal access/.test(e));
}
try {
%DefineAccessorPropertyUnchecked(null, null, null, null, null);
} catch (e) {
assertTrue(/illegal access/.test(e));
}
try {
%DefineDataPropertyUnchecked({}, null, null, null);
} catch (e) {
assertTrue(/illegal access/.test(e));
}
// Defining properties null should fail even when we have
// other allowed values
try {
......@@ -508,12 +489,6 @@ try {
assertTrue(/illegal access/.test(e));
}
try {
%DefineDataPropertyUnchecked(null, 'foo', 0, 0);
} catch (e) {
assertTrue(/illegal access/.test(e));
}
// Test that all possible differences in step 6 in DefineOwnProperty are
// exercised, i.e., any difference in the given property descriptor and the
// existing properties should not return true, but throw an error if the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment