WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
145269
Add a _WKWebKitContentExtensionStore initializer that takes a path
https://bugs.webkit.org/show_bug.cgi?id=145269
Summary
Add a _WKWebKitContentExtensionStore initializer that takes a path
Brian Weinstein
Reported
2015-05-21 09:47:19 PDT
We need a _WKWebKitContentExtensionStore initializer that takes a path
Attachments
[PATCH] Fix
(5.05 KB, patch)
2015-05-21 10:07 PDT
,
Brian Weinstein
achristensen
: review-
Details
Formatted Diff
Diff
[PATCH] Fix v2
(5.08 KB, patch)
2015-05-21 10:59 PDT
,
Brian Weinstein
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Brian Weinstein
Comment 1
2015-05-21 10:07:20 PDT
Created
attachment 253529
[details]
[PATCH] Fix I’m not sure if UserContentExtensionStore::storeWithPath is correct in terms of memory management, but the rest should be good.
WebKit Commit Bot
Comment 2
2015-05-21 10:09:27 PDT
Attachment 253529
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/API/APIUserContentExtensionStore.cpp:57: Declaration has space between type name and * in UserContentExtensionStore *store [whitespace/declaration] [3] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Alex Christensen
Comment 3
2015-05-21 10:18:52 PDT
Comment on
attachment 253529
[details]
[PATCH] Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=253529&action=review
> Source/WebKit2/UIProcess/API/APIUserContentExtensionStore.cpp:57 > + UserContentExtensionStore *store = new UserContentExtensionStore(storePath);
This is definitely a memory leak.
Alex Christensen
Comment 4
2015-05-21 10:21:56 PDT
You'll probably need to use UserContentExtensionStore.wrapper directly and maybe an adoptNS somewhere to make refcounting work right. I probably shouldn't be the final reviewer on this patch.
Anders Carlsson
Comment 5
2015-05-21 10:24:43 PDT
Comment on
attachment 253529
[details]
[PATCH] Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=253529&action=review
>> Source/WebKit2/UIProcess/API/APIUserContentExtensionStore.cpp:57 >> + UserContentExtensionStore *store = new UserContentExtensionStore(storePath); > > This is definitely a memory leak.
This should return a RefPtr<UserContentExtensionStore>.
> Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:36 > ++ (instancetype)storeWithPath:(NSURL *)path;
This should be storeWithURL: Alternatively just make an initializer. Can this fail? If so, maybe it should take an NSError out parameter as well?
Brian Weinstein
Comment 6
2015-05-21 10:37:08 PDT
(In reply to
comment #5
)
> Comment on
attachment 253529
[details]
> [PATCH] Fix > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=253529&action=review
> > >> Source/WebKit2/UIProcess/API/APIUserContentExtensionStore.cpp:57 > >> + UserContentExtensionStore *store = new UserContentExtensionStore(storePath); > > > > This is definitely a memory leak. > > This should return a RefPtr<UserContentExtensionStore>.
Will fix.
> > > Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:36 > > ++ (instancetype)storeWithPath:(NSURL *)path; > > This should be storeWithURL: Alternatively just make an initializer. Can > this fail? If so, maybe it should take an NSError out parameter as well?
(In reply to
comment #5
)
> Comment on
attachment 253529
[details]
> [PATCH] Fix > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=253529&action=review
> > >> Source/WebKit2/UIProcess/API/APIUserContentExtensionStore.cpp:57 > >> + UserContentExtensionStore *store = new UserContentExtensionStore(storePath); > > > > This is definitely a memory leak. > > This should return a RefPtr<UserContentExtensionStore>. > > > Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:36 > > ++ (instancetype)storeWithPath:(NSURL *)path; > > This should be storeWithURL: Alternatively just make an initializer. Can > this fail? If so, maybe it should take an NSError out parameter as well?
This should not fail. I’ll rename it to storeWithURL.
Brian Weinstein
Comment 7
2015-05-21 10:59:24 PDT
Created
attachment 253533
[details]
[PATCH] Fix v2
WebKit Commit Bot
Comment 8
2015-05-21 11:54:24 PDT
Comment on
attachment 253533
[details]
[PATCH] Fix v2 Clearing flags on attachment: 253533 Committed
r184726
: <
http://trac.webkit.org/changeset/184726
>
WebKit Commit Bot
Comment 9
2015-05-21 11:54:28 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug