WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
41447
[GTK] Extra nullcheck needed at SelectionControllerGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=41447
Summary
[GTK] Extra nullcheck needed at SelectionControllerGtk.cpp
Mario Sanchez Prada
Reported
2010-07-01 00:21:19 PDT
In SelectionController::notifyAccessibilityForSelectionChange(), inside SelectionControllerGtk.cpp, we currently have this: [...] AccessibilityObject* accessibilityObject = m_frame->document()->axObjectCache()->getOrCreate(focusedNode); int offset; // Always report the events w.r.t. the non-linked unignored parent. (i.e. ignoreLinks == true) AccessibilityObject* object = objectAndOffsetUnignored(accessibilityObject, offset, true); [...] The problem with this is that, as getOrCreate() could return 0 under some dark circunstances, we're risking here calling to objectAndOffsetUnignored() with null as first parameter, which will crash for sure as that function won't check that (that's a common assumption in AccessibilityObjectWrapperAtk.cpp). Hence, an extra null check is needed. Attaching one-liner patch soon...
Attachments
Patch proposal
(3.12 KB, patch)
2010-07-01 00:46 PDT
,
Mario Sanchez Prada
xan.lopez
: review-
Details
Formatted Diff
Diff
Patch proposal
(2.31 KB, patch)
2010-07-01 01:10 PDT
,
Mario Sanchez Prada
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Mario Sanchez Prada
Comment 1
2010-07-01 00:46:21 PDT
Created
attachment 60209
[details]
Patch proposal Attached patch for this issue.
Xan Lopez
Comment 2
2010-07-01 01:06:49 PDT
Comment on
attachment 60209
[details]
Patch proposal I think doing: if (!accessibilityObject) return; is much better. Also, we should look into why a NULL object is being created in the first place...
Mario Sanchez Prada
Comment 3
2010-07-01 01:10:20 PDT
Created
attachment 60213
[details]
Patch proposal (In reply to
comment #2
)
> (From update of
attachment 60209
[details]
) > I think doing: > > if (!accessibilityObject) > return; > > is much better.
Done.
> Also, we should look into why a NULL object is being created in the first place...
Agree, and I have the feeling is related to the rendering object not being created by that time, although that would be quite weir and would be indeed another bug for sure... In any case I think this null check doesn't hurt either.
WebKit Commit Bot
Comment 4
2010-07-01 03:50:47 PDT
Comment on
attachment 60213
[details]
Patch proposal Clearing flags on attachment: 60213 Committed
r62248
: <
http://trac.webkit.org/changeset/62248
>
WebKit Commit Bot
Comment 5
2010-07-01 03:50:51 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