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

Issue 9812025: Implement lazy JS module initialisation. (Closed)

Created:
8 years, 9 months ago by koz (OOO until 15th September)
Modified:
8 years, 9 months ago
CC:
chromium-reviews, darin-cc_chromium.org, brettw-cc_chromium.org, benwells
Visibility:
Public.

Description

Implement lazy JS module initialisation. The existing lazy JS object code only allows single objects to be evaluated lazily, but a common pattern in existing modules is to define multiple objects and functions in the same closure and attach them as various fields on an existing object, which that interface doesn't provide for. The approach implemented in this change leverages the module system by allowing clients to set 'lazy fields' on already existing objects, which when accessed evaluate to a given field in a given module. BUG=104100 TEST=unit tests provided Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=128131

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -77 lines) Patch
M chrome/renderer/module_system.h View 1 chunk +9 lines, -5 lines 2 comments Download
M chrome/renderer/module_system.cc View 2 chunks +38 lines, -47 lines 2 comments Download
M chrome/renderer/module_system_unittest.cc View 1 chunk +9 lines, -25 lines 2 comments Download

Messages

Total messages: 4 (0 generated)
koz (OOO until 15th September)
8 years, 9 months ago (2012-03-21 23:17:41 UTC) #1
not at google - send to devlin
lgtm, nice. As discussed, also add a test which sets some of these lazy fields ...
8 years, 9 months ago (2012-03-22 00:35:53 UTC) #2
koz (OOO until 15th September)
I've added a test for assigning to lazy fields - assignment works as per usual. ...
8 years, 9 months ago (2012-03-22 01:13:00 UTC) #3
commit-bot: I haz the power
8 years, 9 months ago (2012-03-22 01:19:02 UTC) #4
Change committed as 128131

Powered by Google App Engine
This is Rietveld 408576698