diff --git a/native_mate/dictionary.h b/native_mate/dictionary.h index 05b6b86463ab..e636ca5d2f57 100644 --- a/native_mate/dictionary.h +++ b/native_mate/dictionary.h @@ -88,6 +88,12 @@ class Dictionary { CallbackTraits::CreateTemplate(isolate_, callback)->GetFunction()); } + bool Delete(const base::StringPiece& key) { + v8::Maybe result = GetHandle()->Delete(isolate_->GetCurrentContext(), + StringToV8(isolate_, key)); + return !result.IsNothing() && result.FromJust(); + } + bool IsEmpty() const { return isolate() == NULL; } virtual v8::Local GetHandle() const;