Make sure each C++ WebContents has only one JS WebContents

This commit is contained in:
Cheng Zhao 2015-06-24 15:09:50 +08:00
parent 552a12d2ee
commit 1023b67d59
4 changed files with 21 additions and 2 deletions

View file

@ -65,7 +65,7 @@ void TrackableObject::AfterInit(v8::Isolate* isolate) {
weak_map_id_ = weak_map_.Add(isolate, GetWrapper(isolate));
}
void TrackableObject::Attach(base::SupportsUserData* wrapped) {
void TrackableObject::AttachAsUserData(base::SupportsUserData* wrapped) {
wrapped->SetUserData(kTrackedObjectKey, new IDUserData(weak_map_id_));
}