WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 93128
[WIN] Use BString in favour of BSTR to improve memory management
https://bugs.webkit.org/show_bug.cgi?id=93128
Summary
[WIN] Use BString in favour of BSTR to improve memory management
Patrick R. Gansterer
Reported
2012-08-03 08:56:39 PDT
[WIN] Use BString in favour of BSTR to improve memory management
Attachments
Patch
(33.84 KB, patch)
2012-08-03 09:02 PDT
,
Patrick R. Gansterer
no flags
Details
Formatted Diff
Diff
Patch
(38.48 KB, patch)
2012-09-18 14:22 PDT
,
Patrick R. Gansterer
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
Patch
(38.48 KB, patch)
2012-09-19 03:55 PDT
,
Patrick R. Gansterer
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Patrick R. Gansterer
Comment 1
2012-08-03 09:02:28 PDT
Created
attachment 156394
[details]
Patch
Eric Seidel (no email)
Comment 2
2012-08-07 15:27:15 PDT
Comment on
attachment 156394
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=156394&action=review
> Source/WebCore/platform/win/BString.cpp:130 > - if (m_bstr) > - SysFreeString(m_bstr); > + clear();
Is SysFreeString null-safe? The previous code didn't seem to think so.
Patrick R. Gansterer
Comment 3
2012-08-07 23:10:45 PDT
Comment on
attachment 156394
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=156394&action=review
>> Source/WebCore/platform/win/BString.cpp:130 >> + clear(); > > Is SysFreeString null-safe? The previous code didn't seem to think so.
Yes it is. The previous code did only on a few places.
WebKit Review Bot
Comment 4
2012-09-17 14:43:29 PDT
Comment on
attachment 156394
[details]
Patch Clearing flags on attachment: 156394 Committed
r128809
: <
http://trac.webkit.org/changeset/128809
>
WebKit Review Bot
Comment 5
2012-09-17 14:43:32 PDT
All reviewed patches have been landed. Closing bug.
WebKit Review Bot
Comment 6
2012-09-17 14:58:35 PDT
Re-opened since this is blocked by 96958
Patrick R. Gansterer
Comment 7
2012-09-18 14:22:10 PDT
Created
attachment 164621
[details]
Patch
WebKit Review Bot
Comment 8
2012-09-19 03:34:59 PDT
Comment on
attachment 164621
[details]
Patch Rejecting
attachment 164621
[details]
from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1 ERROR: /mnt/git/webkit-commit-queue/Source/WebCore/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive). Full output:
http://queues.webkit.org/results/13898489
Patrick R. Gansterer
Comment 9
2012-09-19 03:55:08 PDT
Created
attachment 164707
[details]
Patch
WebKit Review Bot
Comment 10
2012-09-19 04:15:10 PDT
Comment on
attachment 164707
[details]
Patch Clearing flags on attachment: 164707 Committed
r128988
: <
http://trac.webkit.org/changeset/128988
>
WebKit Review Bot
Comment 11
2012-09-19 04:15:14 PDT
All reviewed patches have been landed. Closing bug.
Roger Fong
Comment 12
2012-09-25 16:20:18 PDT
Hello, this patch is causing an assertion failure on Windows. All I'm doing is launching WinLauncher. I get an assertion failure ASSERTION FAILED !m_bstr. Here's the stack trace. WebKit.dll!WebCore::BString::operator&() Line 61 + 0x3a bytes C++
> WebKit.dll!WebView::notifyPreferencesChanged(IWebNotification * notification=0x005fefb8) Line 4591 + 0x16 bytes C++
WebKit.dll!WebView::onNotify(IWebNotification * notification=0x005fefb8) Line 4549 + 0xf bytes C++ WebKit.dll!WebNotificationCenter::postNotificationInternal(IWebNotification * notification=0x005fefb8, wchar_t * notificationName=0x004fb9bc, IUnknown * anObject=0x005be918) Line 131 + 0x14 bytes C++ WebKit.dll!WebNotificationCenter::postNotificationName(wchar_t * notificationName=0x004fb9bc, IUnknown * anObject=0x005be918, IPropertyBag * userInfo=0x00000000) Line 188 C++ WebKit.dll!WebPreferences::postPreferencesChangesNotification() Line 144 + 0x1c bytes C++ WebKit.dll!WebView::initWithFrame(tagRECT frame={...}, wchar_t * frameName=0x00000000, wchar_t * groupName=0x00000000) Line 2726 C++ WinLauncher.dll!dllLauncherEntryPoint(HINSTANCE__ * __formal=0x00120000, HINSTANCE__ * __formal=0x00120000, HINSTANCE__ * __formal=0x00120000, int nCmdShow=1) Line 368 + 0x35 bytes C++ WinLauncher.exe!wWinMain(HINSTANCE__ * hInstance=0x00120000, HINSTANCE__ * hPrevInstance=0x00000000, wchar_t * lpstrCmdLine=0x004a4afe, int nCmdShow=1) Line 208 + 0x18 bytes C++ WinLauncher.exe!__tmainCRTStartup() Line 589 + 0x1c bytes C kernel32.dll!@BaseThreadInitThunk@12() + 0x12 bytes ntdll.dll!___RtlUserThreadStart@8() + 0x27 bytes ntdll.dll!__RtlUserThreadStart@8() + 0x1b bytes Do you mind taking a look, it's preventing my from debugging things... Thanks!
Roger Fong
Comment 13
2012-09-25 16:31:23 PDT
(In reply to
comment #12
)
> Hello, this patch is causing an assertion failure on Windows. All I'm doing is launching WinLauncher. > > I get an assertion failure ASSERTION FAILED !m_bstr. > > Here's the stack trace. > > > WebKit.dll!WebCore::BString::operator&() Line 61 + 0x3a bytes C++ > > WebKit.dll!WebView::notifyPreferencesChanged(IWebNotification * notification=0x005fefb8) Line 4591 + 0x16 bytes C++ > WebKit.dll!WebView::onNotify(IWebNotification * notification=0x005fefb8) Line 4549 + 0xf bytes C++ > WebKit.dll!WebNotificationCenter::postNotificationInternal(IWebNotification * notification=0x005fefb8, wchar_t * notificationName=0x004fb9bc, IUnknown * anObject=0x005be918) Line 131 + 0x14 bytes C++ > WebKit.dll!WebNotificationCenter::postNotificationName(wchar_t * notificationName=0x004fb9bc, IUnknown * anObject=0x005be918, IPropertyBag * userInfo=0x00000000) Line 188 C++ > WebKit.dll!WebPreferences::postPreferencesChangesNotification() Line 144 + 0x1c bytes C++ > WebKit.dll!WebView::initWithFrame(tagRECT frame={...}, wchar_t * frameName=0x00000000, wchar_t * groupName=0x00000000) Line 2726 C++ > WinLauncher.dll!dllLauncherEntryPoint(HINSTANCE__ * __formal=0x00120000, HINSTANCE__ * __formal=0x00120000, HINSTANCE__ * __formal=0x00120000, int nCmdShow=1) Line 368 + 0x35 bytes C++ > WinLauncher.exe!wWinMain(HINSTANCE__ * hInstance=0x00120000, HINSTANCE__ * hPrevInstance=0x00000000, wchar_t * lpstrCmdLine=0x004a4afe, int nCmdShow=1) Line 208 + 0x18 bytes C++ > WinLauncher.exe!__tmainCRTStartup() Line 589 + 0x1c bytes C > kernel32.dll!@BaseThreadInitThunk@12() + 0x12 bytes > ntdll.dll!___RtlUserThreadStart@8() + 0x27 bytes > ntdll.dll!__RtlUserThreadStart@8() + 0x1b bytes > > Do you mind taking a look, it's preventing my from debugging things... > Thanks!
In notifyPreferencesChanged, it looks like the bstr gets set on settings->setCursiveFontFamily(toAtomicString(str));. Later a reference to said bstr gets passed into hr = preferences->defaultTextEncodingName(&str); For some reason the &operator for bstrings is overriden to assert(!b_str). I'm not sure why though...
Patrick R. Gansterer
Comment 14
2012-09-26 00:05:00 PDT
Committed
r129598
: <
http://trac.webkit.org/changeset/129598
>
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