Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(7)

Issue 4816065: Quick fix on undefined ___jsl

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 7 months ago by mhermanto
Modified:
11 years, 2 months ago
Reviewers:
johnfargo, fargo
Base URL:
http://svn.apache.org/repos/asf/shindig/trunk/
Visibility:
Public.

Description

- always inject ___jsl. - minor clean-ups.

Patch Set 1 #

Total comments: 2

Patch Set 2 : Update patch #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -6 lines) Patch
java/gadgets/src/main/java/org/apache/shindig/gadgets/js/ConfigInjectionProcessor.java View 1 chunk +1 line, -0 lines 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/js/AddJslInfoVariableProcessorTest.java View 1 3 chunks +5 lines, -5 lines 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/js/ConfigInjectionProcessorTest.java View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 6
mhermanto
14 years, 7 months ago (2011-08-01 21:18:41 UTC) #1
johnfargo
http://codereview.appspot.com/4816065/diff/1/java/gadgets/src/main/java/org/apache/shindig/gadgets/js/AddJslInfoVariableProcessor.java File java/gadgets/src/main/java/org/apache/shindig/gadgets/js/AddJslInfoVariableProcessor.java (right): http://codereview.appspot.com/4816065/diff/1/java/gadgets/src/main/java/org/apache/shindig/gadgets/js/AddJslInfoVariableProcessor.java#newcode69 java/gadgets/src/main/java/org/apache/shindig/gadgets/js/AddJslInfoVariableProcessor.java:69: builder.prependJs(BASE_HINT_TEMPLATE, CODE_ID); This is reasonable to do anyway, but ...
14 years, 7 months ago (2011-08-01 21:24:00 UTC) #2
mhermanto
On Mon, Aug 1, 2011 at 2:24 PM, <johnfargo@gmail.com> wrote: > > http://codereview.appspot.com/**4816065/diff/1/java/gadgets/** > src/main/java/org/apache/**shindig/gadgets/js/** ...
14 years, 7 months ago (2011-08-01 21:53:41 UTC) #3
johnfargo
LGTM++ Agreed on both -- and, with the second change being the only file in ...
14 years, 7 months ago (2011-08-01 22:03:33 UTC) #4
mhermanto
Update patch
14 years, 7 months ago (2011-08-01 22:05:09 UTC) #5
mhermanto
14 years, 7 months ago (2011-08-01 22:05:53 UTC) #6
Yap, second change only. Changes re-uploaded.

On Mon, Aug 1, 2011 at 3:03 PM, John Hjelmstad <johnfargo@gmail.com> wrote:

> LGTM++
>
> Agreed on both -- and, with the second change being the only file in the CL
> I see what happened here. Let's discuss the more foundational changes (eg.
> filtering out nohint=1) after this fix.
>
>
> On Mon, Aug 1, 2011 at 2:53 PM, Michael Hermanto <mhermanto@gmail.com>wrote:
>
>>
>>
>> On Mon, Aug 1, 2011 at 2:24 PM, <johnfargo@gmail.com> wrote:
>>
>>>
>>> http://codereview.appspot.com/**4816065/diff/1/java/gadgets/**
>>> src/main/java/org/apache/**shindig/gadgets/js/**
>>>
AddJslInfoVariableProcessor.**java<http://codereview.appspot.com/4816065/diff/1/java/gadgets/src/main/java/org/apache/shindig/gadgets/js/AddJslInfoVariableProcessor.java>
>>> File
>>>
>>> java/gadgets/src/main/java/**org/apache/shindig/gadgets/js/**
>>> AddJslInfoVariableProcessor.**java
>>> (right):
>>>
>>> http://codereview.appspot.com/**4816065/diff/1/java/gadgets/**
>>> src/main/java/org/apache/**shindig/gadgets/js/**
>>>
AddJslInfoVariableProcessor.**java#newcode69<http://codereview.appspot.com/4816065/diff/1/java/gadgets/src/main/java/org/apache/shindig/gadgets/js/AddJslInfoVariableProcessor.java#newcode69>
>>> java/gadgets/src/main/java/**org/apache/shindig/gadgets/js/**
>>> AddJslInfoVariableProcessor.**java:69:
>>>
>>> builder.prependJs(BASE_HINT_**TEMPLATE, CODE_ID);
>>> This is reasonable to do anyway, but I'm curious about the particulars
>>> of the error condition that you found. In theory nohint should mean
>>> "don't modify ___jsl" though what it really means is "don't inject
>>> anything dynamic". Mostly want to clarify what I missed the first
>>> go-around.
>>>
>>
>> I think we should have ___jsl = {} injection completely in another
>> processor, given some set of conditions.
>> This change will not fix the problem that was reported, so I can remove
>> it. I can't explain why now, but as long as DeferredExportJsProcessor is
>> doing builder.cleariJs(), whatever I put in here will not matter. I can
>> revert this file.
>>
>>
>>>
>>> http://codereview.appspot.com/**4816065/diff/1/java/gadgets/**
>>> src/main/java/org/apache/**shindig/gadgets/js/**
>>>
ConfigInjectionProcessor.java<http://codereview.appspot.com/4816065/diff/1/java/gadgets/src/main/java/org/apache/shindig/gadgets/js/ConfigInjectionProcessor.java>
>>> File
>>>
>>> java/gadgets/src/main/java/**org/apache/shindig/gadgets/js/**
>>> ConfigInjectionProcessor.java
>>> (right):
>>>
>>> http://codereview.appspot.com/**4816065/diff/1/java/gadgets/**
>>> src/main/java/org/apache/**shindig/gadgets/js/**
>>>
ConfigInjectionProcessor.java#**newcode51<http://codereview.appspot.com/4816065/diff/1/java/gadgets/src/main/java/org/apache/shindig/gadgets/js/ConfigInjectionProcessor.java#newcode51>
>>> java/gadgets/src/main/java/**org/apache/shindig/gadgets/js/**
>>> ConfigInjectionProcessor.java:**51:
>>> "window['___jsl'] = window['___jsl'] || {};" +
>>> this is an instance basically of the same thing ;) I'd argue that
>>> nohint=1 should perhaps be applied for this processor, under the
>>> assertion that nohint == "second phase load"
>>
>>
>> It is the same, but this will (quickly ;-) fix. I think the condition need
>> to be revised to what you said (but I don't know the full extent what it
>> should be), and possibly the ordering of processors in pipeline. Leaving as
>> is, as it's safe (with possibly bit of extra code).
>>
>>
http://codereview.appspot.com/**4816065/<http://codereview.appspot.com/4816065/>
>>>
>>
>>
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b