Reviewers: Michael Achenbach, danno, ulan,
Description:
Correct a misuse of sizeof (introduced in r22709).
BUG=
Please review this at https://codereview.chromium.org/436653002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+2, -1 lines):
M src/runtime.cc
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index
7afa3a6aa6e6122bc1932a2a320d3077684d18d9..63d6ea2da831449eb4c31f0786da60e4deee2d53
100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -15591,7 +15591,8 @@ const Runtime::Function*
Runtime::FunctionForName(Handle<String> name) {
const Runtime::Function* Runtime::FunctionForEntry(Address entry) {
- for (size_t i = 0; i < sizeof(kIntrinsicFunctions); ++i) {
+ size_t length = sizeof(kIntrinsicFunctions) /
sizeof(*kIntrinsicFunctions);
+ for (size_t i = 0; i < length; ++i) {
if (entry == kIntrinsicFunctions[i].entry) {
return &(kIntrinsicFunctions[i]);
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.