Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Mullvad Browser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Applications
Mullvad Browser
Commits
d22a753d
Commit
d22a753d
authored
23 years ago
by
dbaron%fas.harvard.edu
Browse files
Options
Downloads
Patches
Plain Diff
Fix nsDependentString assertions when using history window, part 2. b=109172 r=jag sr=alecf
parent
e445180e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xpfe/components/history/src/nsGlobalHistory.cpp
+12
-10
12 additions, 10 deletions
xpfe/components/history/src/nsGlobalHistory.cpp
with
12 additions
and
10 deletions
xpfe/components/history/src/nsGlobalHistory.cpp
+
12
−
10
View file @
d22a753d
...
...
@@ -147,9 +147,10 @@ class tokenPair {
public:
tokenPair
(
const
char
*
aName
,
PRUint32
aNameLen
,
const
char
*
aValue
,
PRUint32
aValueLen
)
:
tokenName
(
aName
,
aName
+
aNameLen
),
tokenName
(
aName
)
,
tokenNameLength
(
aNameLen
),
tokenValue
(
aValue
),
tokenValueLength
(
aValueLen
)
{}
nsDependentSingleFragmentCSubstring
tokenName
;
const
char
*
tokenName
;
PRUint32
tokenNameLength
;
const
char
*
tokenValue
;
PRUint32
tokenValueLength
;
};
...
...
@@ -1052,9 +1053,8 @@ nsGlobalHistory::RemoveMatchingRows(rowMatchCallback aMatchFunc,
continue
;
const
char
*
startPtr
=
(
const
char
*
)
yarn
.
mYarn_Buf
;
rv
=
gRDFService
->
GetResource
(
nsCAutoString
(
Substring
(
startPtr
,
startPtr
+
yarn
.
mYarn_Fill
)).
get
(),
getter_AddRefs
(
resource
));
nsCAutoString
uri
(
Substring
(
startPtr
,
startPtr
+
yarn
.
mYarn_Fill
));
rv
=
gRDFService
->
GetResource
(
uri
.
get
(),
getter_AddRefs
(
resource
));
NS_ASSERTION
(
NS_SUCCEEDED
(
rv
),
"unable to get resource"
);
if
(
NS_FAILED
(
rv
))
continue
;
...
...
@@ -2846,29 +2846,31 @@ nsGlobalHistory::TokenListToSearchQuery(const nsVoidArray& aTokens,
tokenPair
*
token
=
(
tokenPair
*
)
aTokens
[
i
];
// per-term tokens
if
(
token
->
tokenName
.
Equals
(
"datasource"
))
{
const
nsASingleFragmentCString
&
tokenName
=
Substring
(
token
->
tokenName
,
token
->
tokenName
+
token
->
tokenNameLength
);
if
(
tokenName
.
Equals
(
NS_LITERAL_CSTRING
(
"datasource"
)))
{
datasource
=
token
->
tokenValue
;
datasourceLen
=
token
->
tokenValueLength
;
}
else
if
(
token
->
tokenName
.
Equals
(
"match"
))
{
else
if
(
tokenName
.
Equals
(
NS_LITERAL_CSTRING
(
"match"
))
)
{
if
(
Substring
(
token
->
tokenValue
,
token
->
tokenValue
+
token
->
tokenValueLength
).
Equals
(
"AgeInDays"
))
matchCallback
=
matchAgeInDaysCallback
;
property
=
token
->
tokenValue
;
propertyLen
=
token
->
tokenValueLength
;
}
else
if
(
token
->
tokenName
.
Equals
(
"method"
))
{
else
if
(
tokenName
.
Equals
(
NS_LITERAL_CSTRING
(
"method"
))
)
{
method
=
token
->
tokenValue
;
methodLen
=
token
->
tokenValueLength
;
}
else
if
(
token
->
tokenName
.
Equals
(
"text"
))
{
else
if
(
tokenName
.
Equals
(
NS_LITERAL_CSTRING
(
"text"
))
)
{
text
=
token
->
tokenValue
;
textLen
=
token
->
tokenValueLength
;
}
// really, we should be storing the group-by as a column number or
// rdf resource
else
if
(
token
->
tokenName
.
Equals
(
"groupby"
))
{
else
if
(
tokenName
.
Equals
(
NS_LITERAL_CSTRING
(
"groupby"
))
)
{
mdb_err
err
;
err
=
mStore
->
QueryToken
(
mEnv
,
nsCAutoString
(
token
->
tokenValue
).
get
(),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment