Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e2dec98

Browse filesBrowse files
committed
deps: upgrade to V8 4.7.80.25
Pick up the latest patch-level from V8 stable. This includes the following fix: * v8/v8@c408ea7 Make AstRawString deduplication encoding-agnostic. BUG=v8:4450 LOG=N R=hablich@chromium.org TBR=hablich@chromium.org Review URL: https://codereview.chromium.org/1494293003 See also: #4128 PR-URL: #4160 Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
1 parent 1ec09b0 commit e2dec98
Copy full SHA for e2dec98

File tree

Expand file treeCollapse file tree

3 files changed

+35
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+35
-5
lines changed
Open diff view settings
Collapse file

‎deps/v8/include/v8-version.h‎

Copy file name to clipboardExpand all lines: deps/v8/include/v8-version.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 4
1212
#define V8_MINOR_VERSION 7
1313
#define V8_BUILD_NUMBER 80
14-
#define V8_PATCH_LEVEL 24
14+
#define V8_PATCH_LEVEL 25
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)
Collapse file

‎deps/v8/src/ast-value-factory.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/ast-value-factory.cc
+26-4Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
#include "src/api.h"
3131
#include "src/objects.h"
32+
#include "src/utils.h"
3233

3334
namespace v8 {
3435
namespace internal {
@@ -379,11 +380,32 @@ AstRawString* AstValueFactory::GetString(uint32_t hash, bool is_one_byte,
379380
bool AstValueFactory::AstRawStringCompare(void* a, void* b) {
380381
const AstRawString* lhs = static_cast<AstRawString*>(a);
381382
const AstRawString* rhs = static_cast<AstRawString*>(b);
382-
if (lhs->is_one_byte() != rhs->is_one_byte()) return false;
383+
if (lhs->length() != rhs->length()) return false;
383384
if (lhs->hash() != rhs->hash()) return false;
384-
int len = lhs->byte_length();
385-
if (rhs->byte_length() != len) return false;
386-
return memcmp(lhs->raw_data(), rhs->raw_data(), len) == 0;
385+
const unsigned char* l = lhs->raw_data();
386+
const unsigned char* r = rhs->raw_data();
387+
size_t length = rhs->length();
388+
if (lhs->is_one_byte()) {
389+
if (rhs->is_one_byte()) {
390+
return CompareCharsUnsigned(reinterpret_cast<const uint8_t*>(l),
391+
reinterpret_cast<const uint8_t*>(r),
392+
length) == 0;
393+
} else {
394+
return CompareCharsUnsigned(reinterpret_cast<const uint8_t*>(l),
395+
reinterpret_cast<const uint16_t*>(r),
396+
length) == 0;
397+
}
398+
} else {
399+
if (rhs->is_one_byte()) {
400+
return CompareCharsUnsigned(reinterpret_cast<const uint16_t*>(l),
401+
reinterpret_cast<const uint8_t*>(r),
402+
length) == 0;
403+
} else {
404+
return CompareCharsUnsigned(reinterpret_cast<const uint16_t*>(l),
405+
reinterpret_cast<const uint16_t*>(r),
406+
length) == 0;
407+
}
408+
}
387409
}
388410
} // namespace internal
389411
} // namespace v8
Collapse file
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Copyright 2015 the V8 project authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
({})['foobar\u2653'.slice(0, 6)] = null;
6+
var x;
7+
eval('x = function foobar() { return foobar };');
8+
x();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.