Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
b3bafb60
Commit
b3bafb60
authored
Mar 30, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Fixed jsheap_grow implementation.
parent
f01cd3a3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
jsutils.c
dlls/jscript/jsutils.c
+6
-1
regexp.js
dlls/jscript/tests/regexp.js
+4
-0
No files found.
dlls/jscript/jsutils.c
View file @
b3bafb60
...
...
@@ -126,13 +126,18 @@ void *jsheap_alloc(jsheap_t *heap, DWORD size)
void
*
jsheap_grow
(
jsheap_t
*
heap
,
void
*
mem
,
DWORD
size
,
DWORD
inc
)
{
void
*
ret
;
if
(
mem
==
(
BYTE
*
)
heap
->
blocks
[
heap
->
last_block
]
+
heap
->
offset
-
size
&&
heap
->
offset
+
inc
<
block_size
(
heap
->
last_block
))
{
heap
->
offset
+=
inc
;
return
mem
;
}
return
jsheap_alloc
(
heap
,
size
+
inc
);
ret
=
jsheap_alloc
(
heap
,
size
+
inc
);
if
(
ret
)
/* FIXME: avoid coppying for custom blocks */
memcpy
(
ret
,
mem
,
size
);
return
ret
;
}
void
jsheap_clear
(
jsheap_t
*
heap
)
...
...
dlls/jscript/tests/regexp.js
View file @
b3bafb60
...
...
@@ -44,6 +44,10 @@ ok(m[0] === "aa", "m[0] = " + m[0]);
ok
(
RegExp
.
leftContext
===
" "
,
"RegExp.leftContext = "
+
RegExp
.
leftContext
);
ok
(
RegExp
.
rightContext
===
"baaa"
,
"RegExp.rightContext = "
+
RegExp
.
rightContext
);
m
=
/^
[^
<
]
*
(
<
(
.|
\s)
+>
)[^
>
]
*$|^#
(\w
+
)
$/
.
exec
(
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
);
ok
(
m
===
null
,
"m is not null"
);
re
=
/a+/g
;
ok
(
re
.
lastIndex
===
0
,
"re.lastIndex = "
+
re
.
lastIndex
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment