Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(731)

Issue 23513048: Don't lookup the cache for the result of Function::New (Closed)

Created:
7 years, 3 months ago by yusukesuzuki
Modified:
7 years, 3 months ago
CC:
v8-dev
Visibility:
Public.

Description

Don't lookup the cache for the result of Function::New Since isFunctionCached condition is wrong, we lookup the cache even if doNotCache is true. As a result, Function::New always returns null except for the first time. BUG=272579 R=dcarney@chromium.org, mstarzinger@chromium.org, yhirano@chromium.org Committed: http://code.google.com/p/v8/source/detail?r=16737

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Patch Set 3 : #

Total comments: 1

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -2 lines) Patch
M src/apinatives.js View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M test/cctest/test-api.cc View 1 2 3 1 chunk +10 lines, -1 line 0 comments Download

Messages

Total messages: 13 (0 generated)
yusukesuzuki
7 years, 3 months ago (2013-09-13 05:43:41 UTC) #1
yusukesuzuki
https://chromiumcodereview.appspot.com/23513048/diff/1/src/apinatives.js File src/apinatives.js (right): https://chromiumcodereview.appspot.com/23513048/diff/1/src/apinatives.js#newcode76 src/apinatives.js:76: cache[serialNumber] = null; Because of this, `(serialNumber in cache) ...
7 years, 3 months ago (2013-09-13 05:52:00 UTC) #2
yhirano
Thanks! lgtm. https://codereview.chromium.org/23513048/diff/1/src/apinatives.js File src/apinatives.js (right): https://codereview.chromium.org/23513048/diff/1/src/apinatives.js#newcode73 src/apinatives.js:73: !doNotCache && (serialNumber in cache) && (cache[serialNumber] ...
7 years, 3 months ago (2013-09-13 05:54:56 UTC) #3
yusukesuzuki
https://chromiumcodereview.appspot.com/23513048/diff/1/src/apinatives.js File src/apinatives.js (right): https://chromiumcodereview.appspot.com/23513048/diff/1/src/apinatives.js#newcode73 src/apinatives.js:73: !doNotCache && (serialNumber in cache) && (cache[serialNumber] != kUninitialized); ...
7 years, 3 months ago (2013-09-13 06:03:06 UTC) #4
dcarney
lgtm thanks for fixing this! I should have added more tests when i created the ...
7 years, 3 months ago (2013-09-13 06:42:17 UTC) #5
Michael Starzinger
https://codereview.chromium.org/23513048/diff/10001/src/apinatives.js File src/apinatives.js (right): https://codereview.chromium.org/23513048/diff/10001/src/apinatives.js#newcode77 src/apinatives.js:77: cache[serialNumber] = null; Couldn't we just remove this initialization ...
7 years, 3 months ago (2013-09-13 08:59:08 UTC) #6
yusukesuzuki
On 2013/09/13 08:59:08, Michael Starzinger wrote: > https://codereview.chromium.org/23513048/diff/10001/src/apinatives.js > File src/apinatives.js (right): > > https://codereview.chromium.org/23513048/diff/10001/src/apinatives.js#newcode77 ...
7 years, 3 months ago (2013-09-13 10:46:19 UTC) #7
dcarney
> I think there's no problem. We can remove this initialization. > But my concern ...
7 years, 3 months ago (2013-09-16 07:31:58 UTC) #8
dcarney
> I think there's no problem. We can remove this initialization. > But my concern ...
7 years, 3 months ago (2013-09-16 07:31:58 UTC) #9
yusukesuzuki
Thanks for your reply. So I'll change my patch.
7 years, 3 months ago (2013-09-16 07:51:57 UTC) #10
yusukesuzuki
I've updated the patch. PTAL
7 years, 3 months ago (2013-09-16 08:16:54 UTC) #11
Michael Starzinger
LGTM. Thanks for the fix. I'll land this for you.
7 years, 3 months ago (2013-09-16 14:14:38 UTC) #12
Michael Starzinger
7 years, 3 months ago (2013-09-16 14:50:09 UTC) #13
Message was sent while issue was closed.
Committed patchset #4 manually as r16737 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698