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/518162 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Jochen Eisinger <jochen@chromium.org> Cr-Commit-Position: refs/heads/master@{#45554}
This commit is contained in:
parent
75e679113b
commit
70de12b73c
@ -3053,12 +3053,9 @@ 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,
|
||||
PropertyAttribute attribs = None));
|
||||
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));
|
||||
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
|
||||
|
18
src/api.cc
18
src/api.cc
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user