Add Dictionary::Delete
This commit is contained in:
parent
21cda4e7fc
commit
9398494100
1 changed files with 6 additions and 0 deletions
|
@ -88,6 +88,12 @@ class Dictionary {
|
|||
CallbackTraits<T>::CreateTemplate(isolate_, callback)->GetFunction());
|
||||
}
|
||||
|
||||
bool Delete(const base::StringPiece& key) {
|
||||
v8::Maybe<bool> result = GetHandle()->Delete(isolate_->GetCurrentContext(),
|
||||
StringToV8(isolate_, key));
|
||||
return !result.IsNothing() && result.FromJust();
|
||||
}
|
||||
|
||||
bool IsEmpty() const { return isolate() == NULL; }
|
||||
|
||||
virtual v8::Local<v8::Object> GetHandle() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue