Some strange JavaScript bug

Any topic
Post Reply
Alex654
Posts: 38
Joined: Tue Dec 12, 2017 8:35 pm

Some strange JavaScript bug

Post by Alex654 » Fri Mar 29, 2019 1:04 am

Good morning,

I noticed that sites that work fine in Chrome 49 (which supports using let and const outside Strict Mode), don't work for me in Custom Build version 54. You wrote on this forum that Custom Build 54 is based on parts of Chrome 49, 50, 52 and 54. Then why does it not compile JS code that works in Chrome 49?.. Should I enable something in flags to make it work, or is it a bug?

Don't get me wrong, I like the font rendering you made, and some other nice things like NPAPI plugins support. But you positioned your custom build as the last available build for users that are stuck on Win XP, and for that reason I think it should be newer and better than the latest official Chrome for this OS (version 49). If not - then why use it, 49 works just fine (except blurry fonts and update reminder, which I managed to cut out using disassembling in IDA Pro and DLL patching, btw).

admin
Site Admin
Posts: 219
Joined: Wed Feb 06, 2013 7:47 pm

Re: Some strange JavaScript bug

Post by admin » Fri Mar 29, 2019 9:58 am

It was positioned as the last available build, it worked fine, not anymore because every day the web changes, the browser is the SAME, the web is not the same anymore, people update their pages to support newer javascript and soon chrome v49 won't even load a webpage.

Alex654
Posts: 38
Joined: Tue Dec 12, 2017 8:35 pm

Re: Some strange JavaScript bug

Post by Alex654 » Fri Mar 29, 2019 9:02 pm

> and soon chrome v49 won't even load a webpage

No, no, I'm not about this. I'm currently running version 45 and it is OK on 90% sites (even no warnings in console). 49 runs 95-97% sites fine.
I'm just curious - maybe I was mistaken and build 54 was made on the base of Chromium 48, not 49. But if that's the case, why? Because version 49 did not exist when you made the build? Then I think we need another one, based on Chromium 49. I think that will not be much of a problem for you to produce :)

Or am I the only one here who is concerned about sites that require ES6 browser support and wants to use Advanced Chrome on XP? :)

admin
Site Admin
Posts: 219
Joined: Wed Feb 06, 2013 7:47 pm

Re: Some strange JavaScript bug

Post by admin » Sat Mar 30, 2019 12:46 am

Well, v54 has v48 on root, that was needed to be able to compile, build's took an hour back then and used microsoft cl.exe, between that time frame they changed to ninja compiler, that single change created tons of problems, actually the code is so 'dirty' that barely works.

After that they cleaned up their mess, every change they made moved away from XP support, thats why working and building in that range is so hard now, in the middle of the caos.

Alex654
Posts: 38
Joined: Tue Dec 12, 2017 8:35 pm

Re: Some strange JavaScript bug

Post by Alex654 » Sat Mar 30, 2019 9:53 am

Thanks for detailed answer. Anyway, is it possible to build a version based on Chromium v49? Or it already uses ninja? Also, why do the switch to ninja make compiling the code by people other than Chromium developers difficult/impossible?

admin
Site Admin
Posts: 219
Joined: Wed Feb 06, 2013 7:47 pm

Re: Some strange JavaScript bug

Post by admin » Sat Mar 30, 2019 10:14 am

If you want to build v49 it will only work with cl.exe and back then they used old visual studio, if you build with ninja or newer visual studio wont work.

To succesfully build, the environment must match exactly, C++ compiler is very picky.

Also right version of sdk is needed, even depot tools was very different back then.

Alex654
Posts: 38
Joined: Tue Dec 12, 2017 8:35 pm

Re: Some strange JavaScript bug

Post by Alex654 » Sat Mar 30, 2019 11:15 am

OK, do you have the right environment? My machine is not very powerful, but I can try to do it. And of course your patches should be applied to source code of v49 in the first place.

admin
Site Admin
Posts: 219
Joined: Wed Feb 06, 2013 7:47 pm

Re: Some strange JavaScript bug

Post by admin » Sat Mar 30, 2019 12:28 pm

I am no even close to have the right environment, I have Visual Studio 2017 as per instructions:
https://chromium.googlesource.com/chrom ... uctions.md

To get the instructions to setup the old environment you need to use the way back machine:
https://web.archive.org/web/20170823161 ... uctions.md

That is the only snapshot for that page that web.archive has, google changes that page a lot, the usual google stuff:
As of September, 2017 (R503915) Chromium requires Visual Studio 2017 update 3.2 with the 15063 (Creators Update) Windows SDK or later to build. Visual Studio Community Edition should work if its license is appropriate for you............

Every time they did their magic "As of September, Chromium requires Visual Studio" I was like FU$$$$!

That means that you need to update the hole thing to be able to build, you asked earlier about why is difficult, now try porting code between the dates they upgrade Visual Studio and its impossible, they change the source code a lot, won't build no matter what..

It gets even harder, they use right now ninja compiler + Visual Studio, back then on v49 they used only Visual Studio, in fact, since it is C++ code it is supposed to build using VS2017 but it is impossible..., you must use ninja.

Alex654
Posts: 38
Joined: Tue Dec 12, 2017 8:35 pm

Re: Some strange JavaScript bug

Post by Alex654 » Sat Mar 30, 2019 10:53 pm

> That means that you need to update the hole thing to be able to build, you asked earlier about why is difficult
Oh, I see the problem.

> now try porting code between the dates they upgrade Visual Studio
Here didn't get it quite well. You should get the latest code before applying patches and building anyway, I guess. Or you mean that after changing the environment the code is changed too just to match the new environment, and you should make it too to stay in sync?

Anyway, the main question is - why didn't you make a snapshot or two of the compiler, depot_tools and anything?.. It is so important to keep the environment that is working! You knew then that version 49 would be the last for NT 5.1, so why? Did you really beleive you would be able to port back newer versions forever?

P.S. I did have sources of Chromium 49 on my hard drive (unfortunately deleted them 1-2 years ago), and there is even depot_tools archive of that period still left untouched. I suppose I can git pull the sources back. But I never had the working and correctly set up environment to compile any Chromium version... Tried installing ninja and VS 2015, but no luck. It did not compile (maybe because of my patches I was trying to apply to source that were incompatible with v49).

admin
Site Admin
Posts: 219
Joined: Wed Feb 06, 2013 7:47 pm

Re: Some strange JavaScript bug

Post by admin » Sun Mar 31, 2019 12:08 am

Once they change the compiler is not possible to compile older code with newer environment or compile newer code with older environment.

I did not save the old environment, with visual studio installed is about 35GB and my SSD drive is not too big.

Windows with VS2015 and SDK was about 45GB plus chromium source code with million of files about 40GB, this must be run on SSD if you want to build in less than 4 hours.

You would need old depot tools, find a way to run gclient without updating itself to latest version, install the correct version of visual studio, proper version of sdk, then grab de source code, config build with gyp file, and finally build.

Once it builds you can try updating webkit, if you update webkit then you are forced to update v8, then it won't build so you will have to hack the source code until it builds, you have to find ways to simulate the sandbox so newer v8 can run.

Other way is to make v74 compatible with XP, this might be easier because at least you can build it, you will have to be one of the best C++ developer of the galaxy to downgrade everything for XP, it might take years and maybe when you finally succeed no one will use XP anymore.

Alex654
Posts: 38
Joined: Tue Dec 12, 2017 8:35 pm

Re: Some strange JavaScript bug

Post by Alex654 » Sun Mar 31, 2019 11:15 am

> find a way to run gclient without updating itself to latest version

You are wrong somewhere I think. I can download and run gclient, then it will fetch the latest revision of source code, but then I can pull the right version from their Git repository using Git command line. It should work, I made this trick with version 49 long after it had been released, about spring-summer 2017.

But unfortunately I don't know what exactly gclient does. I know what the complier does - compiling, linking, packaging to WinPE containers. But I don't know anything about gclient and depot_tools.

admin
Site Admin
Posts: 219
Joined: Wed Feb 06, 2013 7:47 pm

Re: Some strange JavaScript bug

Post by admin » Sun Mar 31, 2019 1:26 pm

the problem is that gclient does several things like updating some pyton libraries, you need an exact setup of what was used then.

So, you run gclient, it updates everything even third party tools, then you use git to roll back, then you leave third party tools updated to latest version so might give problems with runhooks.

When gclient runs it does git on itself, then using that code downloads some stuff and setup what it will download and how, you need to lock gclient to think it has the latest version and then run gclient, I had to do that, maybe is was not lucky.

Alex654
Posts: 38
Joined: Tue Dec 12, 2017 8:35 pm

Re: Some strange JavaScript bug

Post by Alex654 » Mon Apr 01, 2019 8:54 am

> so might give problems with runhooks

What are runhooks anyway? Git hooks?

And if you are right, how do other people build older versions of Chromium based on Chromium 49 (Steam and Yandex Browser use it on Win XP, also Opera and Maxthon do)?

admin
Site Admin
Posts: 219
Joined: Wed Feb 06, 2013 7:47 pm

Re: Some strange JavaScript bug

Post by admin » Mon Apr 01, 2019 9:01 am

They may have a copy of the exact setup they used to build, that means they don't run gclient, they only run hooks when they add new files to source code.

runhooks is a script that setups the build environment to be able to build, it is like having only the source code and using a script to create dynamically the visual studio project and compiler settings.

Post Reply