Commit 70de12b7 authored by Jochen Eisinger's avatar Jochen Eisinger Committed by Commit Bot

Remove deprecated ForceSet

Also move the soon-to-be-deprecated version to deprecated

BUG=none
R=ulan@chromium.org

Change-Id: I2252404f63e25ac35c7798daf66b36144bef6a7e
Reviewed-on: https://chromium-review.googlesource.com/518162Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45554}
parent 75e67911
......@@ -3053,11 +3053,8 @@ class V8_EXPORT Object : public Value {
//
// Note also that this only works for named properties.
V8_DEPRECATED("Use CreateDataProperty / DefineOwnProperty",
bool ForceSet(Local<Value> key, Local<Value> value,
PropertyAttribute attribs = None));
V8_DEPRECATE_SOON("Use CreateDataProperty / DefineOwnProperty",
Maybe<bool> ForceSet(Local<Context> context,
Local<Value> key, Local<Value> value,
Maybe<bool> ForceSet(Local<Context> context, Local<Value> key,
Local<Value> value,
PropertyAttribute attribs = None));
V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));
......
......@@ -4431,24 +4431,6 @@ Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context> context,
}
bool v8::Object::ForceSet(v8::Local<Value> key, v8::Local<Value> value,
v8::PropertyAttribute attribs) {
i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
PREPARE_FOR_EXECUTION_GENERIC(isolate, Local<Context>(), Object, ForceSet,
false, i::HandleScope, false);
i::Handle<i::JSObject> self =
i::Handle<i::JSObject>::cast(Utils::OpenHandle(this));
i::Handle<i::Object> key_obj = Utils::OpenHandle(*key);
i::Handle<i::Object> value_obj = Utils::OpenHandle(*value);
has_pending_exception =
DefineObjectProperty(self, key_obj, value_obj,
static_cast<i::PropertyAttributes>(attribs))
.is_null();
EXCEPTION_BAILOUT_CHECK_SCOPED(isolate, false);
return true;
}
Maybe<bool> v8::Object::SetPrivate(Local<Context> context, Local<Private> key,
Local<Value> value) {
PREPARE_FOR_EXECUTION_PRIMITIVE(context, Object, SetPrivate, bool);
......
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