Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
clear the spellcheck client on script context invalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
bridiver committed Sep 9, 2016
1 parent 3f27e53 commit 711a025
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions brave/renderer/extensions/web_frame_bindings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ WebFrameBindings::WebFrameBindings(extensions::ScriptContext* context)
WebFrameBindings::~WebFrameBindings() {
}

void WebFrameBindings::Invalidate() {
context()->web_frame()->view()->setSpellCheckClient(nullptr);
spell_check_client_.reset(nullptr);
ObjectBackedNativeHandler::Invalidate();
}

void WebFrameBindings::SetSpellCheckProvider(
const v8::FunctionCallbackInfo<v8::Value>& args) {
const std::string lang = mate::V8ToString(args[0].As<v8::String>());
Expand Down
1 change: 1 addition & 0 deletions brave/renderer/extensions/web_frame_bindings.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class WebFrameBindings : public extensions::ObjectBackedNativeHandler {
void SetSpellCheckProvider(const v8::FunctionCallbackInfo<v8::Value>& args);
void SetGlobal(const v8::FunctionCallbackInfo<v8::Value>& args);
void ExecuteJavaScript(const v8::FunctionCallbackInfo<v8::Value>& args);
void Invalidate() override;

private:
void BindToGC(const v8::FunctionCallbackInfo<v8::Value>& args);
Expand Down

4 comments on commit 711a025

@bbondy
Copy link
Member

@bbondy bbondy commented on 711a025 Sep 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

@darkdh
Copy link
Member

@darkdh darkdh commented on 711a025 Sep 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

@bridiver
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weird, this just showed up for me for some reason and I thought someone tried to make the same change again

@bridiver
Copy link
Collaborator Author

@bridiver bridiver commented on 711a025 Sep 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was the commit the corrected it 88c4f1b

Please sign in to comment.