On 2014年10月31日 02:30, ISHIKAWA, Chiaki wrote:
> On 2014/10/31 0:46, Gregory Szorc wrote:
>> EXTRA_PP_JS_MODULES should work in c-c. Does it not?
>>
>> https://ci.mozilla.org/job/mozilla-central-docs/Tree_Documentation/build/buildsystem/mozbuild-symbols.html#extra-pp-js-modules
>>
>>
> 
> Thank you for the tips.
> 
> But I had no idea about this.
> 
> Furthermore, if there is an existing moz.build, things would have been easier.
> 
> The directory where nsContextMenu.js is located, namely
> mail/base/content/
> does not even have moz.build file in there.
> 
> In the parent directory, there is a moz.build directory, but
> it does not refer to |content| directory but to
> |modules| directory, another directory.
> 
> I think I need an expert who knows the build infrastructure to
> investigate this issue.
> 
> TIa
> 


Figured out that jar.mn in the parent directory has the listing of JS files
in ./content directory
and by placing "*" in the row where the particular file is listed,
preprocessing happens.

(Also noted by the follow up from Magnus Mellin in
https://bugzilla.mozilla.org/show_bug.cgi?id=1085382
)

I hope I can get C-C TB to pass more tests successfully soon.
The health of TC is crucial for my workflow at the office.


TIA

>>
>> On 10/30/14 8:05 AM, ISHIKAWA, Chiaki wrote:
>>> Below is a quote from
>>> bugzilla bug Bug 1085382.
>>>
>>> How can we run a preprocessor on a .js file use it instead of
>>> the raw unprocessed filef for C-C TB?
>>>
>>> What is a difference between a .js file that gets processed and the ones
>>> that doesn't?
>>>
>>> TIA
>>>
>>> --- begin quote ---
>>> Created attachment 8514294 [details] [diff] [review]
>>> Work-in-progress patch Take 2.
>>>
>>> I am in the process of debugging.
>>>
>>> I am attaching a work-in-progress patch.  (I have not addressed yet
>>> the build issue of failure when the files under phishing directories
>>> are removed. moz.build, etc. need to be changed for successful build.)
>>>
>>> I have uploaded a WIP patch since I encountered a problem again.
>>>
>>> There are two files that need to be modified for removing the
>>> reportPhishingURL:
>>>   - mail/base/content/nsContextMenu.js
>>>   - mail/base/content/mailWindowOverlay.xul
>>>
>>> I think .dtd file is for localization and so can remain as is without
>>> affecting functionality.
>>>
>>> I thought I would use #ifndef MOZ_THUNDERBIRD/#endif to comment out
>>> the parts that is not supported by THUNDERBIRD (and I don't know much
>>> about SpiderMonkey as of now.)
>>> So I thought using MOZ_THUNDERBIRD was prudent.
>>>
>>> (I have only compiled the binary of C-C TB
>>> and using that binary WITHOUT INSTALLATION for testing.
>>> This may matter to the problem I mention below.)
>>>
>>> Anyway, I found out that preprocessing by mozbuild.preprocessor
>>> seems to occur ONLY for
>>>   - mail/base/content/mailWindowOverlay.xul
>>>     -> preprocessed and copied into
>>>
>>> MOZ_OBJECT/bin/chrome/messenger/content/messenger/mailWindowOverlay.xul
>>>
>>> mail/base/content/nsContextMenu.js is not preprocessed and
>>> is referenced by a direct symlink from
>>> MOZ_OBJECT/dist/bin/chrome/messenger/content/messenger/nsContextMenu.js
>>>
>>> So placing #ifndef/#endif in nsContextMenu.js to comment out some
>>> parts caused a loading error of the JavaScript file, I think, although
>>> funnily, I didn't see the explicit loading error despite the strict
>>> checking done by JS engine lately.  I only got suspicious by a later
>>> error as follows:
>>>
>>> JavaScript error: chrome://messenger/content/mailContextMenus.js, line
>>> 50: TypeError: gContextMenu is undefined
>>>
>>> Can anybody enlighten me how to get this preprocessing done for
>>> nsContextMenu.js as is done for
>>> mail/base/content/mailWindowOverlay.xul ?
>>>
>>> (To be honest I have no idea which files gets preprocessed and which
>>> ones are not. Build infrastructure is not very intuitive.)
>>>
>>> With the work-in-progress patch, I have removed the report phishing
>>> URL menu from the context menu when one selects a URL in an HTML mail
>>> successfully.
>>>
>>> So the remaining issues are
>>>   - finding out how to perform the preprocessing for nsContextMenu.js,
>>>     and
>>>   - finding out the correct changes to moz.build and others so that the
>>>     build succeeds after files below phishing directory are removed.
>>>
>>> TIA
>>>
>>> --- end quote ---
>>> _______________________________________________
>>> dev-builds mailing list
>>> [email protected]
>>> https://lists.mozilla.org/listinfo/dev-builds
>>>
>>
> 
_______________________________________________
dev-builds mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-builds

Reply via email to